public static FSTransactionInfo beginTransactionForCommit(long baseRevision, SVNProperties revisionProperties, FSFS owner) throws SVNException { List caps = new ArrayList(); caps.add("mergeinfo"); String author = revisionProperties.getStringValue(SVNRevisionProperty.AUTHOR); FSHooks.runStartCommitHook(owner.getRepositoryRoot(), author, caps); FSTransactionInfo txn = FSTransactionRoot.beginTransaction(baseRevision, FSTransactionRoot.SVN_FS_TXN_CHECK_LOCKS, owner); owner.changeTransactionProperties(txn.getTxnId(), revisionProperties); return txn; }
public static FSTransactionInfo beginTransactionForCommit(long baseRevision, SVNProperties revisionProperties, FSFS owner) throws SVNException { List caps = new ArrayList(); caps.add("mergeinfo"); String author = revisionProperties.getStringValue(SVNRevisionProperty.AUTHOR); FSHooks.runStartCommitHook(owner.getRepositoryRoot(), author, caps); FSTransactionInfo txn = FSTransactionRoot.beginTransaction(baseRevision, FSTransactionRoot.SVN_FS_TXN_CHECK_LOCKS, owner); owner.changeTransactionProperties(txn.getTxnId(), revisionProperties); return txn; }
public static FSTransactionInfo beginTransactionForCommit(long baseRevision, SVNProperties revisionProperties, FSFS owner) throws SVNException { List caps = new ArrayList(); caps.add("mergeinfo"); String author = revisionProperties.getStringValue(SVNRevisionProperty.AUTHOR); if (owner != null && owner.isHooksEnabled()) { FSHooks.runStartCommitHook(owner.getRepositoryRoot(), author, caps); } FSTransactionInfo txn = FSTransactionRoot.beginTransaction(baseRevision, FSTransactionRoot.SVN_FS_TXN_CHECK_LOCKS, owner); owner.changeTransactionProperties(txn.getTxnId(), revisionProperties); return txn; }
public static void attachAutoRevisionProperties(FSTransactionInfo txn, String path, FSFS fsfs) throws SVNException { String logMessage = "Autoversioning commit: a non-deltaV client made a change to\n" + path; SVNProperties props = new SVNProperties(); props.put(SVNRevisionProperty.LOG, logMessage); props.put(SVNRevisionProperty.AUTOVERSIONED, "*"); fsfs.changeTransactionProperties(txn.getTxnId(), props); }
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 removeProperty(DAVElement propName) throws DAVException { String reposPropName = getReposPropName(propName); if (reposPropName == null) { return; } try { FSFS fsfs = myResource.getFSFS(); if (myResource.isBaseLined()) { if (myResource.isWorking()) { FSTransactionInfo txn = myResource.getTxnInfo(); SVNProperties props = new SVNProperties(); props.put(reposPropName, (SVNPropertyValue) null); fsfs.changeTransactionProperties(txn.getTxnId(), props); } else { SVNRepository repos = myResource.getRepository(); repos.setRevisionPropertyValue(myResource.getRevision(), reposPropName, null); } } else { DAVResourceURI resourceURI = myResource.getResourceURI(); FSCommitter committer = getCommitter(); committer.changeNodeProperty(resourceURI.getPath(), reposPropName, null); } } catch (SVNException svne) { throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "could not remove a property", null); } myProperties = null; }
SVNProperties props = new SVNProperties(); props.put(reposPropName, value); fsfs.changeTransactionProperties(txn.getTxnId(), props); } else { SVNRepository repos = myResource.getRepository();