public SVNRepository createRepository(SVNURL url, boolean mayReuse) throws SVNException { return core.createRepository(url,mayReuse); } }
private void checkClockOutOfSync() { try { for (ModuleLocation l : locations) { SVNDirEntry dir = manager.createRepository(l.getSVNURL(), true).info("/", -1); // see http://www.nabble.com/NullPointerException-in-SVN-Checkout-Update-td21609781.html that reported this being null. if (dir != null && dir.getDate() != null && dir.getDate().after(new Date())) { listener.getLogger().println(Messages.SubversionSCM_ClockOutOfSync()); } } } catch (SVNAuthenticationException e) { // if we don't have access to '/', ignore. error LOGGER.log(Level.FINE, "Failed to estimate the remote time stamp", e); } catch (SVNException e) { LOGGER.log(Level.INFO, "Failed to estimate the remote time stamp", e); } }
private void checkClockOutOfSync() { try { for (ModuleLocation l : locations) { SVNDirEntry dir = manager.createRepository(l.getSVNURL(), true).info("/", -1); // see http://www.nabble.com/NullPointerException-in-SVN-Checkout-Update-td21609781.html that reported this being null. if (dir != null && dir.getDate() != null && dir.getDate().after(new Date())) { listener.getLogger().println(Messages.SubversionSCM_ClockOutOfSync()); } } } catch (SVNAuthenticationException e) { // if we don't have access to '/', ignore. error LOGGER.log(Level.FINE, "Failed to estimate the remote time stamp", e); } catch (SVNException e) { LOGGER.log(Level.INFO, "Failed to estimate the remote time stamp", e); } }
@Override public <T> T doWithClientAndRepository(final SvnOperation<T> operation) throws StoreException { checkShutdownState(); SVNClientManager clientManager = null; try { clientManager = clientManagerPool.borrowObject(); if (clientManager == null) { throw new StoreException.ReadException("Failed to acquire SVNClientManager"); } // do not explicitly close the session because mayReuse=true final SVNRepository repository = clientManager.createRepository(svnUrl, true); return operation.execute(repository, clientManager); } catch (Exception e) { Throwables.propagateIfInstanceOf(e, StoreException.class); throw operation.handleException(e); } finally { if (clientManager != null) { try { clientManagerPool.returnObject(clientManager); } catch (Exception e) { LOGGER.fatal("Failed to return SVNClientManager", e); } } } }
@Override public <T> T doWithClientAndRepository(final SvnOperation<T> operation) throws StoreException { checkShutdownState(); SVNClientManager clientManager = null; try { clientManager = clientManagerPool.borrowObject(); if (clientManager == null) { throw new StoreException.ReadException("Failed to acquire SVNClientManager"); } // do not explicitly close the session because mayReuse=true final SVNRepository repository = clientManager.createRepository(svnUrl, true); return operation.execute(repository, clientManager); } catch (Exception e) { Throwables.propagateIfInstanceOf(e, StoreException.class); throw operation.handleException(e); } finally { if (clientManager != null) { try { clientManagerPool.returnObject(clientManager); } catch (Exception e) { LOGGER.fatal("Failed to return SVNClientManager", e); } } } }
@Before public void setUp() throws Exception { File repo = new CopyExisting(DefaultSVNLogFilter.class.getResource("JENKINS-10449.zip")).allocate(); SVNURL svnUrl = SVNURL.fromFile(repo); SVNClientManager svnMgr = SVNClientManager.newInstance(); svnRepo = svnMgr.createRepository(svnUrl, false); }