public void checkCancelled() throws SVNCancelException { SVNBasicClient.this.checkCancelled(); } };
protected SVNRepository createRepository(SVNURL url, File path, SVNRevision pegRevision, SVNRevision revision) throws SVNException { return createRepository(url, path, pegRevision, revision, null); }
protected SVNWCAccess createWCAccess() { return createWCAccess(null); }
protected SVNRepository createRepository(SVNURL url, File path, SVNAdminArea area, SVNRevision pegRevision, SVNRevision revision, long[] pegRev) throws SVNException { if (url == null) { SVNURL pathURL = getURL(path); if (pathURL == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_MISSING_URL, "''{0}'' has no URL", path); SVNErrorManager.error(err, SVNLogType.WC); } } SVNRevision startRevision = revision; SVNRevision[] resolvedRevisions = resolveRevisions(pegRevision, startRevision, url != null, true); pegRevision = resolvedRevisions[0]; startRevision = resolvedRevisions[1]; SVNRepositoryLocation[] locations = getLocations(url, path, null, pegRevision, startRevision, SVNRevision.UNDEFINED); url = locations[0].getURL(); long actualRevision = locations[0].getRevisionNumber(); SVNRepository repository = createRepository(url, area != null ? area.getRoot() : null, area != null ? area.getWCAccess() : null, true); actualRevision = getRevisionNumber(SVNRevision.create(actualRevision), repository, path); if (actualRevision < 0) { actualRevision = repository.getLatestRevision(); } if (pegRev != null && pegRev.length > 0) { pegRev[0] = actualRevision; } return repository; }
repository = createRepository(url, true); pegRevisionNumber = getRevisionNumber(revision, repository, path); startRevisionNumber = getRevisionNumber(start, repository, path); endRevisionNumber = getRevisionNumber(end, repository, path); } catch (SVNException e) { if (e.getErrorMessage() != null && e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_NOT_IMPLEMENTED) { locations = getLocations10(repository, pegRevisionNumber, startRevisionNumber, endRevisionNumber); } else { throw e;
entry = access.getVersionedEntry(path, false); } else { SVNWCAccess wcAccess = createWCAccess(); try { wcAccess.probeOpen(path, false, 0); url = getEntryLocation(path, entry, pegRevisionNumber, pegRevision); try { if (repos == null) { repos = createRepository(url, null, null, false); closeRepository = true; pegRevisionNumber[0] = getRevisionNumber(pegRevision, null, repos, path); } finally { if (closeRepository) {
Map mergeInfo = null; long targetRev[] = { -1 }; SVNURL url = getEntryLocation(path, entry, targetRev, SVNRevision.WORKING); long revision = targetRev[0]; mergeInfo = getWCMergeInfo(path, entry, null, inherit, false, indirect); try { if (repository == null) { repository = createRepository(url, null, null, false); closeRepository = true; repositoryPath = getPathRelativeToRoot(null, url, entry.getRepositoryRootURL(), null, repository); reposMergeInfo = getReposMergeInfo(repository, repositoryPath, revision, inherit, true); } finally { if (closeRepository) {
Map mergeInfo = null; long targetRev[] = { -1 }; SVNURL url = getEntryLocation(path, entry, targetRev, SVNRevision.WORKING); long revision = targetRev[0]; mergeInfo = getWCMergeInfo(path, entry, null, inherit, false, indirect); try { if (repository == null) { repository = createRepository(url, null, null, false); closeRepository = true; repositoryPath = getPathRelativeToSession(url, null, repository); oldLocation = repository.getLocation(); if (repositoryPath == null) { repository.setLocation(url, false); reposMergeInfo = getReposMergeInfo(repository, repositoryPath, revision, inherit, true); } finally { if (closeRepository) {
if (path != null && (pegRevision == SVNRevision.WORKING || pegRevision == SVNRevision.BASE)) { if (access == null) { access = createWCAccess(); url = getEntryLocation(path, entry, null, SVNRevision.UNDEFINED); reposRoot = entry.getRepositoryRootURL(); } finally { SVNRepository repos = null; try { repos = createRepository(url, path, null, pegRevision, pegRevision, null); reposRoot = repos.getRepositoryRoot(true); } finally {
/** * Dispatches events to the registered event handler (if any). * * @param event the current event * @param progress progress state (from 0 to 1) * @throws SVNException */ public void handleEvent(SVNEvent event, double progress) throws SVNException { dispatchEvent(event, progress); }
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; }
try { if (wcAccess == null) { wcAccess = createWCAccess(); wcAccess.probeOpen(path, false, 0); cleanUp = true; url = getEntryLocation(path, entry, null, SVNRevision.UNDEFINED); if (reposRootURL == null) { reposRootURL = entry.getRepositoryRootURL();
logStart = Math.min(endRevision, logStart); LocationsLogEntryHandler handler = new LocationsLogEntryHandler(path, startRevision, endRevision, pegRevision, kind, getEventDispatcher()); repos.log(new String[] {""}, logStart, logEnd, true, false, handler);
protected long getRevisionNumber(SVNRevision revision, SVNRepository repository, File path) throws SVNException { return getRevisionNumber(revision, null, repository, path); }
protected SVNRepository createRepository(SVNURL url, boolean mayReuse) throws SVNException { SVNRepository repository = null; if (myRepositoryPool == null) { repository = SVNRepositoryFactory.create(url, null); } else { repository = myRepositoryPool.createRepository(url, mayReuse); } repository.setDebugLog(getDebugLog()); return repository; }
protected SVNRepository createRepository(SVNURL url, File path, SVNAdminArea area, SVNRevision pegRevision, SVNRevision revision, long[] pegRev) throws SVNException { if (url == null) { SVNURL pathURL = getURL(path); if (pathURL == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_MISSING_URL, "''{0}'' has no URL", path); SVNErrorManager.error(err, SVNLogType.WC); } } SVNRevision startRevision = revision; SVNRevision[] resolvedRevisions = resolveRevisions(pegRevision, startRevision, url != null, true); pegRevision = resolvedRevisions[0]; startRevision = resolvedRevisions[1]; SVNRepositoryLocation[] locations = getLocations(url, path, null, pegRevision, startRevision, SVNRevision.UNDEFINED); url = locations[0].getURL(); long actualRevision = locations[0].getRevisionNumber(); SVNRepository repository = createRepository(url, area != null ? area.getRoot() : null, area != null ? area.getWCAccess() : null, true); actualRevision = getRevisionNumber(SVNRevision.create(actualRevision), repository, path); if (actualRevision < 0) { actualRevision = repository.getLatestRevision(); } if (pegRev != null && pegRev.length > 0) { pegRev[0] = actualRevision; } return repository; }
repository = createRepository(url, null, null, true); } else { pegRevisionNumber = getRevisionNumber(revision, youngestRevNumber, repository, path); startRevisionNumber = pegRevisionNumber; } else { startRevisionNumber = getRevisionNumber(start, youngestRevNumber, repository, path); endRevisionNumber = startRevisionNumber; } else { endRevisionNumber = getRevisionNumber(end, youngestRevNumber, repository, path); } catch (SVNException e) { if (e.getErrorMessage() != null && e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_NOT_IMPLEMENTED) { locations = getLocations10(repository, pegRevisionNumber, startRevisionNumber, endRevisionNumber); } else { throw e;
entry = access.getVersionedEntry(path, false); } else { SVNWCAccess wcAccess = createWCAccess(); try { wcAccess.probeOpen(path, false, 0); url = getEntryLocation(path, entry, pegRevisionNumber, pegRevision); try { if (repos == null) { repos = createRepository(url, null, null, false); closeRepository = true; pegRevisionNumber[0] = getRevisionNumber(pegRevision, null, repos, path); } finally { if (closeRepository) {
if (path != null && (pegRevision == SVNRevision.WORKING || pegRevision == SVNRevision.BASE)) { if (access == null) { access = createWCAccess(); url = getEntryLocation(path, entry, null, SVNRevision.UNDEFINED); reposRoot = entry.getRepositoryRootURL(); } finally { SVNRepository repos = null; try { repos = createRepository(url, path, null, pegRevision, pegRevision, null); reposRoot = repos.getRepositoryRoot(true); } finally {
/** * Dispatches events to the registered event handler (if any). * * @param event the current event * @param progress progress state (from 0 to 1) * @throws SVNException */ public void handleEvent(SVNEvent event, double progress) throws SVNException { dispatchEvent(event, progress); }