private FSTransactionRoot getTxnRoot() throws SVNException { if (myTxnRoot == null && myTxn != null) { myTxnRoot = myFSFS.createTransactionRoot(myTxn); } return myTxnRoot; }
public void openRevision(Map headers) throws SVNException { myCurrentRevisionBaton = new RevisionBaton(); long revision = -1; if (headers.containsKey(SVNAdminHelper.DUMPFILE_REVISION_NUMBER)) { try { revision = Long.parseLong((String) headers.get(SVNAdminHelper.DUMPFILE_REVISION_NUMBER)); } catch (NumberFormatException nfe) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.STREAM_MALFORMED_DATA, "Cannot parse revision ({0}) in dump file", headers.get(SVNAdminHelper.DUMPFILE_REVISION_NUMBER)); SVNErrorManager.error(err, SVNLogType.FSFS); } } myCurrentRevisionBaton.myRevision = revision; long headRevision = myFSFS.getYoungestRevision(); myCurrentRevisionBaton.myRevisionOffset = revision - (headRevision + 1); if (revision > 0) { myCurrentRevisionBaton.myTxn = FSTransactionRoot.beginTransaction(headRevision, 0, myFSFS); myCurrentRevisionBaton.myTxnRoot = myFSFS.createTransactionRoot(myCurrentRevisionBaton.myTxn); String message = "<<< Started new transaction, based on original revision " + revision; if (myProgressHandler != null) { SVNAdminEvent event = new SVNAdminEvent(revision, SVNAdminEventAction.REVISION_LOAD, message); myProgressHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN); } } }
public void openRevision(Map headers) throws SVNException { myCurrentRevisionBaton = new RevisionBaton(); long revision = -1; if (headers.containsKey(SVNAdminHelper.DUMPFILE_REVISION_NUMBER)) { try { revision = Long.parseLong((String) headers.get(SVNAdminHelper.DUMPFILE_REVISION_NUMBER)); } catch (NumberFormatException nfe) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.STREAM_MALFORMED_DATA, "Cannot parse revision ({0}) in dump file", headers.get(SVNAdminHelper.DUMPFILE_REVISION_NUMBER)); SVNErrorManager.error(err, SVNLogType.FSFS); } } myCurrentRevisionBaton.myRevision = revision; long headRevision = myFSFS.getYoungestRevision(); myCurrentRevisionBaton.myRevisionOffset = revision - (headRevision + 1); if (revision > 0) { myCurrentRevisionBaton.myTxn = FSTransactionRoot.beginTransaction(headRevision, 0, myFSFS); myCurrentRevisionBaton.myTxnRoot = myFSFS.createTransactionRoot(myCurrentRevisionBaton.myTxn); String message = "<<< Started new transaction, based on original revision " + revision; if (myProgressHandler != null) { SVNAdminEvent event = new SVNAdminEvent(revision, SVNAdminEventAction.REVISION_LOAD, message); myProgressHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN); } } }
public void openRevision(Map headers) throws SVNException { myCurrentRevisionBaton = new RevisionBaton(); long revision = -1; if (headers.containsKey(SVNAdminHelper.DUMPFILE_REVISION_NUMBER)) { try { revision = Long.parseLong((String) headers.get(SVNAdminHelper.DUMPFILE_REVISION_NUMBER)); } catch (NumberFormatException nfe) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.STREAM_MALFORMED_DATA, "Cannot parse revision ({0}) in dump file", headers.get(SVNAdminHelper.DUMPFILE_REVISION_NUMBER)); SVNErrorManager.error(err, SVNLogType.FSFS); } } myCurrentRevisionBaton.myRevision = revision; long headRevision = myFSFS.getYoungestRevision(); myCurrentRevisionBaton.myRevisionOffset = revision - (headRevision + 1); if (revision > 0) { myCurrentRevisionBaton.myTxn = FSTransactionRoot.beginTransaction(headRevision, 0, myFSFS); myCurrentRevisionBaton.myTxnRoot = myFSFS.createTransactionRoot(myCurrentRevisionBaton.myTxn); String message = "<<< Started new transaction, based on original revision " + revision; if (myProgressHandler != null) { SVNAdminEvent event = new SVNAdminEvent(revision, SVNAdminEventAction.REVISION_LOAD, message); myProgressHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN); } } }
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 void openRoot(long revision) throws SVNException { long youngestRev = myFSFS.getYoungestRevision(); if (isTxnOwner) { myTxn = beginTransactionForCommit(youngestRev); } else { if (myAuthor != null && !"".equals(myAuthor)) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNRevisionProperty.AUTHOR, myAuthor); } if (myLogMessage != null && !"".equals(myLogMessage)) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNRevisionProperty.LOG, myLogMessage); } } myTxnRoot = myFSFS.createTransactionRoot(myTxn.getTxnId()); myCommitter = new FSCommitter(myFSFS, myTxnRoot, myTxn, myLockTokens, myAuthor); DirBaton dirBaton = new DirBaton(revision, myBasePath, false); myDirsStack.push(dirBaton); }
/** * Returns the size in bytes for the specified path in given transaction * * @param repositoryRoot a repository root directory path * @param path a path to the file inside the repository * @param transactionName a transaction name * @return file size in bytes * @throws SVNException <ul> * <li>no repository is found at * <code>repositoryRoot</code> * </li> * <li>if the specified transaction is not found * </li> * </ul> */ public long doGetFileSize(File repositoryRoot, String path, String transactionName) throws SVNException { if (path == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS, "Missing repository path argument"); SVNErrorManager.error(err, SVNLogType.FSFS); } FSFS fsfs = open(repositoryRoot, transactionName); try { FSTransactionInfo txn = fsfs.openTxn(transactionName); FSRoot root = fsfs.createTransactionRoot(txn); return getFileSize(root, path); } finally { SVNAdminHelper.closeRepository(fsfs); } }
try { FSTransactionInfo txn = fsfs.openTxn(transactionName); FSRoot root = fsfs.createTransactionRoot(txn); catFile(root, path, out); } finally {
protected FSRoot getFSRoot() throws SVNException { FSRepository repository = getSVNLookEnvironment().getRepository(); if (getSVNLookEnvironment().isRevision()) { long rev = getSVNLookEnvironment().getRevision(); if (rev < 0) { rev = repository.getLatestRevision(); } return repository.getFSFS().createRevisionRoot(rev); } return repository.getFSFS().createTransactionRoot(getSVNLookEnvironment().getTransactionInfo()); }
protected FSRoot getFSRoot() throws SVNException { FSRepository repository = getSVNLookEnvironment().getRepository(); if (getSVNLookEnvironment().isRevision()) { long rev = getSVNLookEnvironment().getRevision(); if (rev < 0) { rev = repository.getLatestRevision(); } return repository.getFSFS().createRevisionRoot(rev); } return repository.getFSFS().createTransactionRoot(getSVNLookEnvironment().getTransactionInfo()); }
try { FSTransactionInfo txn = fsfs.openTxn(transactionName); FSRoot root = fsfs.createTransactionRoot(txn); long baseRevision = txn.getBaseRevision();
try { FSTransactionInfo txn = fsfs.openTxn(transactionName); FSRoot root = fsfs.createTransactionRoot(txn); long baseRevision = txn.getBaseRevision();
try { FSTransactionInfo txn = fsfs.openTxn(transactionName); FSRoot root = fsfs.createTransactionRoot(txn); long baseRevision = txn.getBaseRevision();
try { FSTransactionInfo txn = fsfs.openTxn(transactionName); FSRoot root = fsfs.createTransactionRoot(txn); long baseRevision = txn.getBaseRevision();
try { FSTransactionInfo txn = fsfs.openTxn(transactionName); FSRoot root = fsfs.createTransactionRoot(txn); long baseRevision = txn.getBaseRevision();
return fsfs.getTransactionProperties(txn.getTxnId()); root = fsfs.createTransactionRoot(txn);
return fsfs.getTransactionProperties(txn.getTxnId()); root = fsfs.createTransactionRoot(txn);
return fsfs.getTransactionProperties(txn.getTxnId()); root = fsfs.createTransactionRoot(txn);