SVNRepository toRepos = null; try { fromRepos = createRepository(fromURL, null, true); toRepos = createRepository(toURL, null, false); replicator.replicateRepository(fromRepos, toRepos, 1, -1); } finally {
SVNRepository toRepos = null; try { fromRepos = createRepository(fromURL, null, true); toRepos = createRepository(toURL, null, false); replicator.replicateRepository(fromRepos, toRepos, 1, -1); } finally {
SVNRepository toRepos = null; try { fromRepos = createRepository(fromURL, null, true); toRepos = createRepository(toURL, null, false); replicator.replicateRepository(fromRepos, toRepos, 1, -1); } finally {
private SessionInfo openSourceRepository(SVNRepository targetRepos) throws SVNException { SVNPropertyValue fromURL = targetRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_URL); SVNPropertyValue fromUUID = targetRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_UUID); SVNPropertyValue lastMergedRev = targetRepos.getRevisionPropertyValue(0, SVNRevisionProperty.LAST_MERGED_REVISION); if (fromURL == null || fromUUID == null || lastMergedRev == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Destination repository has not been initialized"); SVNErrorManager.error(err, SVNLogType.FSFS); } SVNURL srcURL = SVNURL.parseURIEncoded(fromURL.getString()); SVNRepository srcRepos = createRepository(srcURL, fromUUID.getString(), false); try { return new SessionInfo(srcRepos, Long.parseLong(lastMergedRev.getString())); } catch (NumberFormatException nfe) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, nfe), SVNLogType.FSFS); } return null; }
private SessionInfo openSourceRepository(SVNRepository targetRepos) throws SVNException { SVNPropertyValue fromURL = targetRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_URL); SVNPropertyValue fromUUID = targetRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_UUID); SVNPropertyValue lastMergedRev = targetRepos.getRevisionPropertyValue(0, SVNRevisionProperty.LAST_MERGED_REVISION); if (fromURL == null || fromUUID == null || lastMergedRev == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Destination repository has not been initialized"); SVNErrorManager.error(err, SVNLogType.FSFS); } SVNURL srcURL = SVNURL.parseURIDecoded(fromURL.getString()); SVNRepository srcRepos = createRepository(srcURL, fromUUID.getString(), false); try { return new SessionInfo(srcRepos, Long.parseLong(lastMergedRev.getString())); } catch (NumberFormatException nfe) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, nfe), SVNLogType.FSFS); } return null; }
private SessionInfo openSourceRepository(SVNRepository targetRepos) throws SVNException { SVNPropertyValue fromURL = targetRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_URL); SVNPropertyValue fromUUID = targetRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_UUID); SVNPropertyValue lastMergedRev = targetRepos.getRevisionPropertyValue(0, SVNRevisionProperty.LAST_MERGED_REVISION); if (fromURL == null || fromUUID == null || lastMergedRev == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Destination repository has not been initialized"); SVNErrorManager.error(err, SVNLogType.FSFS); } SVNURL srcURL = SVNURL.parseURIDecoded(fromURL.getString()); SVNRepository srcRepos = createRepository(srcURL, fromUUID.getString(), false); try { return new SessionInfo(srcRepos, Long.parseLong(lastMergedRev.getString())); } catch (NumberFormatException nfe) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.IO_ERROR, nfe), SVNLogType.FSFS); } return null; }
/** * 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(); } } }
SVNRepository toRepos = null; try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); SVNPropertyValue fromURL = toRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_URL);
SVNRepository toRepos = null; try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); SVNPropertyValue fromURL = toRepos.getRevisionPropertyValue(0, SVNRevisionProperty.FROM_URL);
SVNException error2 = null; try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos);
toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos);
SVNException error2 = null; try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos);
SVNException error2 = null; try { toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos);
toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos);
toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos);
toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos); fromRepos = createRepository(fromURL, null, false); SVNURL rootURL = fromRepos.getRepositoryRoot(true); if (SVNPathUtil.getPathAsChild(rootURL.toString(), fromURL.toString()) != null) {
toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos); fromRepos = createRepository(fromURL, null, false); SVNURL rootURL = fromRepos.getRepositoryRoot(true); if (SVNPathUtil.getPathAsChild(rootURL.toString(), fromURL.toString()) != null) {
toRepos = createRepository(toURL, null, true); checkIfRepositoryIsAtRoot(toRepos, toURL); lock(toRepos); fromRepos = createRepository(fromURL, null, false); SVNURL rootURL = fromRepos.getRepositoryRoot(true); if (SVNPathUtil.getPathAsChild(rootURL.toString(), fromURL.toString()) != null) {