/** * Returns information about the synchronization repository located at <code>toURL</code>. * * @param toURL destination repository url * @return synchronization information * @throws SVNException * @since 1.3, SVN 1.6 */ public SVNSyncInfo doInfo(SVNURL toURL) throws SVNException { SVNRepository toRepos = null; try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); SVNPropertyValue fromURL = toRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_URL); if (fromURL == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_URL, "Repository ''{0}'' is not initialized for synchronization", toURL); SVNErrorManager.error(err, SVNLogType.FSFS); } SVNPropertyValue fromUUID = toRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_UUID); SVNPropertyValue lastMergedRevProp = toRepos.getRevisionPropertyValue(0, SVNRevisionProperty.LAST_MERGED_REVISION); long lastMergedRev = lastMergedRevProp != null ? Long.parseLong(lastMergedRevProp.getString()) : SVNRepository.INVALID_REVISION; return new SVNSyncInfo(fromURL.getString(), fromUUID != null ? fromUUID.getString() : null, lastMergedRev); } finally { if (toRepos != null) { toRepos.closeSession(); } } }
try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); SVNPropertyValue fromURL = toRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_URL); if (fromURL == null) {
try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); SVNPropertyValue fromURL = toRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_URL); if (fromURL == null) {
checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos);
try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos); info = openSourceRepository(toRepos);
try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos); info = openSourceRepository(toRepos);
try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos); info = openSourceRepository(toRepos);
checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos);
checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos);
checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos); long latestRevision = toRepos.getLatestRevision();
checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos); long latestRevision = toRepos.getLatestRevision();
checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos); long latestRevision = toRepos.getLatestRevision();