private FSDeltaConsumer getDeltaConsumer() { if (myDeltaConsumer == null) { myDeltaConsumer = new FSDeltaConsumer(myBasePath, myTxnRoot, myFSFS, myCommitter, getAuthor(), myLockTokens); } return myDeltaConsumer; }
private FSDeltaConsumer getDeltaConsumer() { if (myDeltaConsumer == null) { myDeltaConsumer = new FSDeltaConsumer(myBasePath, myTxnRoot, myFSFS, myCommitter, getAuthor(), myLockTokens); } return myDeltaConsumer; }
private FSDeltaConsumer getDeltaConsumer() { if (myDeltaConsumer == null) { myDeltaConsumer = new FSDeltaConsumer(myBasePath, myTxnRoot, myFSFS, myCommitter, getAuthor(), myLockTokens); } return myDeltaConsumer; }
private void releaseLocks() { if (myPathsToLockTokens != null) { for (Iterator paths = myPathsToLockTokens.keySet().iterator(); paths.hasNext();) { String path = (String) paths.next(); String token = (String) myPathsToLockTokens.get(path); String absPath = !path.startsWith("/") ? SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)) : path; try { myFSFS.unlockPath(absPath, token, getAuthor(), false, true); } catch (SVNException svne) { // ignore exceptions } } } }
private void releaseLocks() { if (myPathsToLockTokens != null) { for (Iterator paths = myPathsToLockTokens.keySet().iterator(); paths.hasNext();) { String path = (String) paths.next(); String token = (String) myPathsToLockTokens.get(path); String absPath = !path.startsWith("/") ? SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)) : path; try { myFSFS.unlockPath(absPath, token, getAuthor(), false, true); } catch (SVNException svne) { // ignore exceptions } } } }
private void releaseLocks(Map<String, String> pathsToLockTokens, boolean breakLocks, boolean runHooks) { if (pathsToLockTokens == null) { return; } for (Iterator<String> paths = pathsToLockTokens.keySet().iterator(); paths.hasNext();) { String path = (String) paths.next(); String token = (String) pathsToLockTokens.get(path); String absPath = !path.startsWith("/") ? SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)) : path; try { myFSFS.unlockPath(absPath, token, getAuthor(), breakLocks, runHooks); } catch (SVNException svne) { // ignore exceptions } } }
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); }
myCommitter.allowLockedOperation(myFSFS, path, getAuthor(), myLockTokens, false, false);
FSCommitter.allowLockedOperation(myFSFS, path, getAuthor(), myLockTokens, false, false);
FSCommitter.allowLockedOperation(myFSFS, path, getAuthor(), myLockTokens, false, false);
SVNErrorMessage.TYPE_WARNING); SVNCommitInfo info = new SVNCommitInfo(committedRev, getAuthor(), datestamp, err); releaseLocks(); return info;
public SVNCommitInfo closeEdit() throws SVNException { try { if (myTxn == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "No valid transaction supplied to closeEdit()"); SVNErrorManager.error(err, SVNLogType.FSFS); } long committedRev = -1; if (myDeltaConsumer != null) { myDeltaConsumer.close(); } SVNErrorMessage[] errorMessage = new SVNErrorMessage[1]; committedRev = myCommitter.commitTxn(true, true, errorMessage, null); SVNProperties revProps = myFSFS.getRevisionProperties(committedRev); String dateProp = revProps.getStringValue(SVNRevisionProperty.DATE); Date datestamp = dateProp != null ? SVNDate.parseDateString(dateProp) : null; SVNErrorMessage err = errorMessage[0]; if (err != null && err.getErrorCode() == SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED) { String message = err.getChildErrorMessage() != null ? err.getChildErrorMessage().getFullMessage() : err.getFullMessage(); err = SVNErrorMessage.create(SVNErrorCode.REPOS_POST_COMMIT_HOOK_FAILED, message, SVNErrorMessage.TYPE_WARNING); } SVNCommitInfo info = new SVNCommitInfo(committedRev, getAuthor(), datestamp, err); releaseLocks(); return info; } finally { myRepository.closeRepository(); } }
SVNErrorMessage.TYPE_WARNING); SVNCommitInfo info = new SVNCommitInfo(committedRev, getAuthor(), datestamp, err); releaseLocks(); return info;