/** * Sets a canceller to be used in all {@link SVNRepository} objects produced by this * pool. * * @param canceller caller's canceller * @since 1.1.4 */ public void setCanceller(ISVNCanceller canceller) { myCanceller = canceller; Map pool = getPool(); for (Iterator protocols = pool.keySet().iterator(); protocols.hasNext();) { String key = (String) protocols.next(); SVNRepository repository = (SVNRepository) pool.get(key); repository.setCanceller(canceller); } }
/** * Sets a canceller to be used in all {@link SVNRepository} objects produced by this * pool. * * @param canceller caller's canceller * @since 1.1.4 */ public void setCanceller(ISVNCanceller canceller) { myCanceller = canceller; Map pool = getPool(); for (Iterator protocols = pool.keySet().iterator(); protocols.hasNext();) { String key = (String) protocols.next(); SVNRepository repository = (SVNRepository) pool.get(key); repository.setCanceller(canceller); } }
/** * Sets a canceller to be used in all {@link SVNRepository} objects produced by this * pool. * * @param canceller caller's canceller * @since 1.1.4 */ public void setCanceller(ISVNCanceller canceller) { myCanceller = canceller; Map<String, SVNRepository> pool = getPool(); for (Iterator<String> protocols = pool.keySet().iterator(); protocols.hasNext();) { String key = (String) protocols.next(); SVNRepository repository = (SVNRepository) pool.get(key); repository.setCanceller(canceller); } }
public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (!targets.isEmpty()) { targets.remove(0); } String[] locks = (String[]) targets.toArray(new String[targets.size()]); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.fromFile(getLocalRepository())); String userName = System.getProperty("user.name", "administrator"); repository.setAuthenticationManager(new BasicAuthenticationManager(userName, "")); repository.setCanceller(getEnvironment()); for (int i = 0; i < locks.length; i++) { String lockPath = locks[i]; try { SVNLock lock = repository.getLock(lockPath); if (lock == null) { getEnvironment().getOut().println("Path '" + lockPath + "' isn't locked."); continue; } Map pathToToken = new SVNHashMap(); pathToToken.put(lockPath, lock.getID()); repository.unlock(pathToToken, true, this); } catch (SVNException e) { getEnvironment().handleError(e.getErrorMessage()); } } }
public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (!targets.isEmpty()) { targets.remove(0); } String[] locks = (String[]) targets.toArray(new String[targets.size()]); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.fromFile(getLocalRepository())); String userName = System.getProperty("user.name", "administrator"); repository.setAuthenticationManager(new BasicAuthenticationManager(userName, "")); repository.setCanceller(getEnvironment()); for (int i = 0; i < locks.length; i++) { String lockPath = locks[i]; try { SVNLock lock = repository.getLock(lockPath); if (lock == null) { getEnvironment().getOut().println("Path '" + lockPath + "' isn't locked."); continue; } Map pathToToken = new SVNHashMap(); pathToToken.put(lockPath, lock.getID()); repository.unlock(pathToToken, true, this); } catch (SVNException e) { getEnvironment().handleError(e.getErrorMessage()); } } }
protected SVNRepository createRepository(SVNURL url, String uuid, boolean mayReuse) throws SVNException { SVNRepository repository = null; if (myRepositoryPool == null) { repository = SVNRepositoryFactory.create(url, null); } else { repository = myRepositoryPool.createRepository(url, mayReuse); } if (uuid != null) { String reposUUID = repository.getRepositoryUUID(true); if (!uuid.equals(reposUUID)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_UUID_MISMATCH, "Repository UUID ''{0}'' doesn''t match expected UUID ''{1}''", new Object[] { reposUUID, uuid }); SVNErrorManager.error(err, SVNLogType.WC); } } repository.setDebugLog(getDebugLog()); repository.setCanceller(getEventDispatcher()); return repository; }
protected SVNRepository createRepository(SVNURL url, String uuid, boolean mayReuse) throws SVNException { SVNRepository repository = null; if (myRepositoryPool == null) { repository = SVNRepositoryFactory.create(url, null); } else { repository = myRepositoryPool.createRepository(url, mayReuse); } if (uuid != null) { String reposUUID = repository.getRepositoryUUID(true); if (!uuid.equals(reposUUID)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_UUID_MISMATCH, "Repository UUID ''{0}'' doesn''t match expected UUID ''{1}''", new Object[] { reposUUID, uuid }); SVNErrorManager.error(err, SVNLogType.WC); } } repository.setDebugLog(getDebugLog()); repository.setCanceller(getEventDispatcher()); return repository; }
SVNRepository repository = SVNRepositoryFactory.create(url); repository.setCanceller(getEnvironment()); SVNLock[] locks = repository.getLocks("/"); for (int i = 0; locks != null && i < locks.length; i++) {
SVNRepository repository = SVNRepositoryFactory.create(url); repository.setCanceller(getEnvironment()); SVNLock[] locks = repository.getLocks("/"); for (int i = 0; locks != null && i < locks.length; i++) {
protected SVNRepository createRepository(SVNURL url, String uuid, boolean mayReuse) throws SVNException { SVNRepository repository = null; if (myRepositoryPool == null) { repository = SVNRepositoryFactory.create(url, null); } else { repository = myRepositoryPool.createRepository(url, mayReuse); } if (uuid != null) { String reposUUID = repository.getRepositoryUUID(true); if (!uuid.equals(reposUUID)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_UUID_MISMATCH, "Repository UUID ''{0}'' doesn''t match expected UUID ''{1}''", new Object[] { reposUUID, uuid }); SVNErrorManager.error(err, SVNLogType.WC); } } repository.setDebugLog(getDebugLog()); repository.setCanceller(getEventDispatcher()); return repository; }
protected SVNRepository createRepository(SVNURL url, String uuid, boolean mayReuse) throws SVNException { SVNRepository repository = null; if (myRepositoryPool == null) { repository = SVNRepositoryFactory.create(url, null); } else { repository = myRepositoryPool.createRepository(url, mayReuse); } if (uuid != null) { String reposUUID = repository.getRepositoryUUID(true); if (!uuid.equals(reposUUID)) { SVNErrorMessage err = SVNErrorMessage .create( SVNErrorCode.RA_UUID_MISMATCH, "Repository UUID ''{0}'' doesn''t match expected UUID ''{1}''", new Object[] { reposUUID, uuid }); SVNErrorManager.error(err, SVNLogType.WC); } } repository.setDebugLog(getDebugLog()); repository.setCanceller(getEventDispatcher()); return repository; }
private SVNRepository getSourceRepository() throws SVNException { if (mySourceRepository == null) { mySourceRepository = SVNRepositoryFactory.create(myRepos.getLocation()); mySourceRepository.setAuthenticationManager(myRepos.getAuthenticationManager()); mySourceRepository.setDebugLog(myRepos.getDebugLog()); mySourceRepository.setTunnelProvider(myRepos.getTunnelProvider()); mySourceRepository.setCanceller(myRepos.getCanceller()); } return mySourceRepository; }
private SVNRepository getSourceRepository() throws SVNException { if (mySourceRepository == null) { mySourceRepository = SVNRepositoryFactory.create(myRepos.getLocation()); mySourceRepository.setAuthenticationManager(myRepos.getAuthenticationManager()); mySourceRepository.setDebugLog(myRepos.getDebugLog()); mySourceRepository.setTunnelProvider(myRepos.getTunnelProvider()); mySourceRepository.setCanceller(myRepos.getCanceller()); } return mySourceRepository; }
private SVNRepository getSourceRepository() throws SVNException { if (mySourceRepository == null) { mySourceRepository = SVNRepositoryFactory.create(myRepos.getLocation()); mySourceRepository.setAuthenticationManager(myRepos.getAuthenticationManager()); mySourceRepository.setDebugLog(myRepos.getDebugLog()); mySourceRepository.setTunnelProvider(myRepos.getTunnelProvider()); mySourceRepository.setCanceller(myRepos.getCanceller()); } return mySourceRepository; }
repos.setTunnelProvider(myTunnelProvider); repos.setDebugLog(myDebugLog); repos.setCanceller(myCanceller); setOptionalSpoolLocation(repos, myTunnelProvider); return repos; repos.setTunnelProvider(myTunnelProvider); repos.setDebugLog(myDebugLog); repos.setCanceller(myCanceller); setOptionalSpoolLocation(repos, myTunnelProvider); return repos;
public SVNRepository createRepository(SVNURL url, String expectedUuid, boolean mayReuse) throws SVNException { SVNRepository repository = null; if (getOperationOptionsProvider().getRepositoryPool() == null) { repository = SVNRepositoryFactory.create(url, null); repository.setAuthenticationManager(getOperationOptionsProvider().getAuthenticationManager()); } else { repository = getOperationOptionsProvider().getRepositoryPool().createRepository(url, mayReuse); } if (expectedUuid != null) { String reposUUID = repository.getRepositoryUUID(true); if (!expectedUuid.equals(reposUUID)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_UUID_MISMATCH, "Repository UUID ''{0}'' doesn''t match expected UUID ''{1}''", new Object[] { reposUUID, expectedUuid }); SVNErrorManager.error(err, SVNLogType.WC); } } repository.setCanceller(getOperationOptionsProvider().getCanceller()); repository.setEventHandler(getOperationOptionsProvider().getEventHandler()); return repository; }
public void run() throws SVNException { SVNRevision start = getSVNAdminEnvironment().getStartRevision(); SVNRevision end = getSVNAdminEnvironment().getEndRevision(); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.fromFile(getLocalRepository())); repository.setCanceller(getEnvironment()); long latestRevision = repository.getLatestRevision(); long startRev = getRevisionNumber(start, latestRevision, repository); long endRev = getRevisionNumber(end, latestRevision, repository); if (startRev < 0) { startRev = 0; endRev = latestRevision; } else if (endRev < 0) { endRev = startRev; } if (startRev > endRev) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "First revision cannot be higher than second"), SVNLogType.CLIENT); } SVNAdminClient client = getEnvironment().getClientManager().getAdminClient(); if (!getSVNAdminEnvironment().isQuiet()) { client.setEventHandler(this); } client.doVerify(getLocalRepository(), SVNRevision.create(startRev), SVNRevision.create(endRev)); }
public void run() throws SVNException { SVNRevision start = getSVNAdminEnvironment().getStartRevision(); SVNRevision end = getSVNAdminEnvironment().getEndRevision(); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.fromFile(getLocalRepository())); repository.setCanceller(getEnvironment()); long latestRevision = repository.getLatestRevision(); long startRev = getRevisionNumber(start, latestRevision, repository); long endRev = getRevisionNumber(end, latestRevision, repository); if (startRev < 0) { startRev = 0; endRev = latestRevision; } else if (endRev < 0) { endRev = startRev; } if (startRev > endRev) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "First revision cannot be higher than second"), SVNLogType.CLIENT); } SVNAdminClient client = getEnvironment().getClientManager().getAdminClient(); if (!getSVNAdminEnvironment().isQuiet()) { client.setEventHandler(this); } client.doVerify(getLocalRepository(), SVNRevision.create(startRev), SVNRevision.create(endRev)); }
repository.setCanceller(getEnvironment()); long latestRevision = repository.getLatestRevision(); long startRev = getRevisionNumber(start, latestRevision, repository);
repository.setCanceller(getEnvironment()); long latestRevision = repository.getLatestRevision(); long startRev = getRevisionNumber(start, latestRevision, repository);