public void parseUUID(String uuid) throws SVNException { if (myUUIDAction == SVNUUIDAction.IGNORE_UUID) { return; } if (myUUIDAction != SVNUUIDAction.FORCE_UUID) { long latestRevision = myFSFS.getYoungestRevision(); if (latestRevision != 0) { return; } } myFSFS.setUUID(uuid); }
public void parseUUID(String uuid) throws SVNException { if (myUUIDAction == SVNUUIDAction.IGNORE_UUID) { return; } if (myUUIDAction != SVNUUIDAction.FORCE_UUID) { long latestRevision = myFSFS.getYoungestRevision(); if (latestRevision != 0) { return; } } myFSFS.setUUID(uuid); }
public void parseUUID(String uuid) throws SVNException { if (myUUIDAction == SVNUUIDAction.IGNORE_UUID) { return; } if (myUUIDAction != SVNUUIDAction.FORCE_UUID) { long latestRevision = myFSFS.getYoungestRevision(); if (latestRevision != 0) { return; } } myFSFS.setUUID(uuid); }
public long getLatestRevision() throws SVNException { try { openRepository(); return myFSFS.getYoungestRevision(); } finally { closeRepository(); } }
public long getLatestRevision() throws SVNException { try { openRepository(); return myFSFS.getYoungestRevision(); } finally { closeRepository(); } }
public long getLatestRevision() throws SVNException { try { openRepository(); return myFSFS.getYoungestRevision(); } finally { closeRepository(); } }
public long getLatestRevision() throws SVNException { try { openRepository(); return myFSFS.getYoungestRevision(); } finally { closeRepository(); } }
public void setRevisionProperty(String propertyName, SVNPropertyValue propertyValue) throws SVNException { if (myCurrentRevisionBaton.myRevision > 0) { myFSFS.setTransactionProperty(myCurrentRevisionBaton.myTxn.getTxnId(), propertyName, propertyValue); if (SVNRevisionProperty.DATE.equals(propertyName)) { myCurrentRevisionBaton.myDatestamp = propertyValue; } } else if (myCurrentRevisionBaton.myRevision == 0) { long youngestRevision = myFSFS.getYoungestRevision(); if (youngestRevision == 0) { myFSFS.setRevisionProperty(0, propertyName, propertyValue); } } }
public void setRevisionProperty(String propertyName, SVNPropertyValue propertyValue) throws SVNException { if (myCurrentRevisionBaton.myRevision > 0) { myFSFS.setTransactionProperty(myCurrentRevisionBaton.myTxn.getTxnId(), propertyName, propertyValue); if (SVNRevisionProperty.DATE.equals(propertyName)) { myCurrentRevisionBaton.myDatestamp = propertyValue; } } else if (myCurrentRevisionBaton.myRevision == 0) { long youngestRevision = myFSFS.getYoungestRevision(); if (youngestRevision == 0) { myFSFS.setRevisionProperty(0, propertyName, propertyValue); } } }
public void setRevisionProperty(String propertyName, SVNPropertyValue propertyValue) throws SVNException { if (myCurrentRevisionBaton.myRevision > 0) { myFSFS.setTransactionProperty(myCurrentRevisionBaton.myTxn.getTxnId(), propertyName, propertyValue); if (SVNRevisionProperty.DATE.equals(propertyName)) { myCurrentRevisionBaton.myDatestamp = propertyValue; } } else if (myCurrentRevisionBaton.myRevision == 0) { long youngestRevision = myFSFS.getYoungestRevision(); if (youngestRevision == 0) { myFSFS.setRevisionProperty(0, propertyName, propertyValue); } } }
/** * Returns the latest revision of the repository. * * @param repositoryRoot a repository root directory path * @return a revision number * @throws SVNException no repository is found at * <code>repositoryRoot</code> */ public long doGetYoungestRevision(File repositoryRoot) throws SVNException { FSFS fsfs = null; try { fsfs = SVNAdminHelper.openRepository(repositoryRoot, true); return fsfs.getYoungestRevision(); } finally { SVNAdminHelper.closeRepository(fsfs); } }
/** * Returns the latest revision of the repository. * * @param repositoryRoot a repository root directory path * @return a revision number * @throws SVNException no repository is found at * <code>repositoryRoot</code> */ public long doGetYoungestRevision(File repositoryRoot) throws SVNException { FSFS fsfs = null; try { fsfs = SVNAdminHelper.openRepository(repositoryRoot, true); return fsfs.getYoungestRevision(); } finally { SVNAdminHelper.closeRepository(fsfs); } }
private void ensureRevisionsExists(long revision) throws SVNException { if (FSRepository.isInvalidRevision(revision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_REVISION, "Invalid revision number ''{0}''", new Long(revision)); SVNErrorManager.error(err, SVNLogType.FSFS); } if (revision <= myYoungestRevisionCache) { return; } getYoungestRevision(); if (revision <= myYoungestRevisionCache) { return; } SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_REVISION, "No such revision {0}", String.valueOf(revision)); SVNErrorManager.error(err, SVNLogType.FSFS); }
private void ensureRevisionsExists(long revision) throws SVNException { if (FSRepository.isInvalidRevision(revision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_REVISION, "Invalid revision number ''{0}''", new Long(revision)); SVNErrorManager.error(err, SVNLogType.FSFS); } if (revision <= myYoungestRevisionCache) { return; } getYoungestRevision(); if (revision <= myYoungestRevisionCache) { return; } SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_REVISION, "No such revision {0}", new Long(revision)); SVNErrorManager.error(err, SVNLogType.FSFS); }
public void openRoot(long revision) throws SVNException { long youngestRev = myFSFS.getYoungestRevision(); if (isTxnOwner) { myTxn = FSTransactionRoot.beginTransactionForCommit(youngestRev, myRevProps, myFSFS); } else { myFSFS.changeTransactionProperties(myTxn.getTxnId(), myRevProps); } myTxnRoot = myFSFS.createTransactionRoot(myTxn); myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, myLockTokens, getAuthor()); DirBaton dirBaton = new DirBaton(revision, myBasePath, false); myDirsStack.push(dirBaton); }
public void openRoot(long revision) throws SVNException { long youngestRev = myFSFS.getYoungestRevision(); if (isTxnOwner) { myTxn = FSTransactionRoot.beginTransactionForCommit(youngestRev, myRevProps, myFSFS); } else { myFSFS.changeTransactionProperties(myTxn.getTxnId(), myRevProps); } myTxnRoot = myFSFS.createTransactionRoot(myTxn); myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, myLockTokens, getAuthor()); DirBaton dirBaton = new DirBaton(revision, myBasePath, false); myDirsStack.push(dirBaton); }
public void openRoot(long revision) throws SVNException { long youngestRev = myFSFS.getYoungestRevision(); if (isTxnOwner) { myTxn = FSTransactionRoot.beginTransactionForCommit(youngestRev, myRevProps, myFSFS); } else { myFSFS.changeTransactionProperties(myTxn.getTxnId(), myRevProps); } myTxnRoot = myFSFS.createTransactionRoot(myTxn); myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, myLockTokens, getAuthor()); DirBaton dirBaton = new DirBaton(revision, myBasePath, false); myDirsStack.push(dirBaton); }
public SVNNodeKind checkPath(String path, long revision) throws SVNException { try { openRepository(); if (!SVNRepository.isValidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } String repositoryPath = getRepositoryPath(path); FSRevisionRoot root = myFSFS.createRevisionRoot(revision); return root.checkNodeKind(repositoryPath); } finally { closeRepository(); } }
public SVNProperties getRevisionProperties(long revision) throws SVNException { try{ if (!SVNRevision.isValidRevisionNumber(revision)) { revision = getYoungestRevision(); } return readRevisionProperties(revision); } catch(SVNException e ) { if(e.getErrorMessage().getErrorCode()==SVNErrorCode.FS_NO_SUCH_REVISION && myDBFormat >= MIN_PACKED_REVPROP_FORMAT ) { updateMinUnpackedRevProp(); return readRevisionProperties(revision); } throw e; } }
public SVNNodeKind checkPath(String path, long revision) throws SVNException { try { openRepository(); if (!SVNRepository.isValidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } String repositoryPath = getRepositoryPath(path); FSRevisionRoot root = myFSFS.createRevisionRoot(revision); return root.checkNodeKind(repositoryPath); } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.FS_NOT_DIRECTORY) { return SVNNodeKind.NONE; } throw e; } finally { closeRepository(); } }