public void changeTransactionProperties(String txnId, SVNProperties txnProperties) throws SVNException { for (Iterator iter = txnProperties.nameSet().iterator(); iter.hasNext();) { String propName = (String) iter.next(); SVNPropertyValue propValue = txnProperties.getSVNPropertyValue(propName); setTransactionProperty(txnId, propName, propValue); } }
public void changeTransactionProperties(String txnId, SVNProperties txnProperties) throws SVNException { for (Iterator iter = txnProperties.nameSet().iterator(); iter.hasNext();) { String propName = (String) iter.next(); SVNPropertyValue propValue = txnProperties.getSVNPropertyValue(propName); setTransactionProperty(txnId, propName, propValue); } }
public void changeTransactionProperties(String txnId, SVNProperties txnProperties) throws SVNException { for (Iterator iter = txnProperties.nameSet().iterator(); iter.hasNext();) { String propName = (String) iter.next(); SVNPropertyValue propValue = txnProperties.getSVNPropertyValue(propName); setTransactionProperty(txnId, propName, propValue); } }
public static FSTransactionInfo beginTransaction(long baseRevision, int flags, FSFS owner) throws SVNException { FSTransactionInfo txn = createTxn(baseRevision, owner); String commitTime = SVNDate.formatDate(new Date(System.currentTimeMillis())); owner.setTransactionProperty(txn.getTxnId(), SVNRevisionProperty.DATE, SVNPropertyValue.create(commitTime)); if ((flags & SVN_FS_TXN_CHECK_OUT_OF_DATENESS) != 0) { owner.setTransactionProperty(txn.getTxnId(), SVNProperty.TXN_CHECK_OUT_OF_DATENESS, SVNPropertyValue.create(Boolean.TRUE.toString())); } if ((flags & FSTransactionRoot.SVN_FS_TXN_CHECK_LOCKS) != 0) { owner.setTransactionProperty(txn.getTxnId(), SVNProperty.TXN_CHECK_LOCKS, SVNPropertyValue.create(Boolean.TRUE.toString())); } return txn; }
public static FSTransactionInfo beginTransaction(long baseRevision, int flags, FSFS owner) throws SVNException { FSTransactionInfo txn = createTxn(baseRevision, owner); String commitTime = SVNDate.formatDate(new Date(System.currentTimeMillis())); owner.setTransactionProperty(txn.getTxnId(), SVNRevisionProperty.DATE, SVNPropertyValue.create(commitTime)); if ((flags & SVN_FS_TXN_CHECK_OUT_OF_DATENESS) != 0) { owner.setTransactionProperty(txn.getTxnId(), SVNProperty.TXN_CHECK_OUT_OF_DATENESS, SVNPropertyValue.create(Boolean.TRUE.toString())); } if ((flags & FSTransactionRoot.SVN_FS_TXN_CHECK_LOCKS) != 0) { owner.setTransactionProperty(txn.getTxnId(), SVNProperty.TXN_CHECK_LOCKS, SVNPropertyValue.create(Boolean.TRUE.toString())); } return txn; }
private FSTransactionInfo beginTransactionForCommit(long baseRevision) throws SVNException { FSHooks.runStartCommitHook(myFSFS.getRepositoryRoot(), myAuthor); FSTransactionInfo txn = FSTransactionRoot.beginTransaction(baseRevision, FSTransactionRoot.SVN_FS_TXN_CHECK_LOCKS, myFSFS); if (myAuthor != null && !"".equals(myAuthor)) { myFSFS.setTransactionProperty(txn.getTxnId(), SVNRevisionProperty.AUTHOR, myAuthor); } if (myLogMessage != null && !"".equals(myLogMessage)) { myFSFS.setTransactionProperty(txn.getTxnId(), SVNRevisionProperty.LOG, myLogMessage); } return txn; }
public static FSTransactionInfo beginTransaction(long baseRevision, int flags, FSFS owner) throws SVNException { FSTransactionInfo txn = createTxn(baseRevision, owner); String commitTime = SVNDate.formatDate(new Date(System.currentTimeMillis())); owner.setTransactionProperty(txn.getTxnId(), SVNRevisionProperty.DATE, SVNPropertyValue.create(commitTime)); if ((flags & SVN_FS_TXN_CHECK_OUT_OF_DATENESS) != 0) { owner.setTransactionProperty(txn.getTxnId(), SVNProperty.TXN_CHECK_OUT_OF_DATENESS, SVNPropertyValue.create(Boolean.TRUE.toString())); } if ((flags & FSTransactionRoot.SVN_FS_TXN_CHECK_LOCKS) != 0) { owner.setTransactionProperty(txn.getTxnId(), SVNProperty.TXN_CHECK_LOCKS, SVNPropertyValue.create(Boolean.TRUE.toString())); } return txn; }
public static FSTransactionInfo beginTransaction(long baseRevision, int flags, FSFS owner) throws SVNException { FSTransactionInfo txn = createTxn(baseRevision, owner); String commitTime = SVNTimeUtil.formatDate(new Date(System.currentTimeMillis())); owner.setTransactionProperty(txn.getTxnId(), SVNRevisionProperty.DATE, commitTime); if ((flags & SVN_FS_TXN_CHECK_OUT_OF_DATENESS) != 0) { owner.setTransactionProperty(txn.getTxnId(), SVNProperty.TXN_CHECK_OUT_OF_DATENESS, SVNProperty.toString(true)); } if ((flags & FSTransactionRoot.SVN_FS_TXN_CHECK_LOCKS) != 0) { owner.setTransactionProperty(txn.getTxnId(), SVNProperty.TXN_CHECK_LOCKS, SVNProperty.toString(true)); } return txn; }
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); } } }
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); }
private void commit(String startNodeId, String startCopyId, long newRevision, OutputStream protoFileOS, FSID newRootId, FSTransactionRoot txnRoot, File revisionPrototypeFile, long offset) throws SVNException { try { protoFileOS = SVNFileUtil.openFileForWriting(revisionPrototypeFile, true); FSID rootId = FSID.createTxnId("0", "0", myTxn.getTxnId()); CountingOutputStream revWriter = new CountingOutputStream(protoFileOS, offset); newRootId = txnRoot.writeFinalRevision(newRootId, revWriter, newRevision, rootId, startNodeId, startCopyId); long changedPathOffset = txnRoot.writeFinalChangedPathInfo(revWriter); String offsetsLine = "\n" + newRootId.getOffset() + " " + changedPathOffset + "\n"; protoFileOS.write(offsetsLine.getBytes("UTF-8")); } catch (IOException ioe) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, ioe.getLocalizedMessage()); SVNErrorManager.error(err, ioe, SVNLogType.FSFS); } finally { SVNFileUtil.closeFile(protoFileOS); } SVNProperties txnProps = myFSFS.getTransactionProperties(myTxn.getTxnId()); if (txnProps != null && !txnProps.isEmpty()) { if (txnProps.getStringValue(SVNProperty.TXN_CHECK_OUT_OF_DATENESS) != null) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNProperty.TXN_CHECK_OUT_OF_DATENESS, null); } if (txnProps.getStringValue(SVNProperty.TXN_CHECK_LOCKS) != null) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNProperty.TXN_CHECK_LOCKS, null); } } }
private void commit(String startNodeId, String startCopyId, long newRevision, OutputStream protoFileOS, FSID newRootId, FSTransactionRoot txnRoot, File revisionPrototypeFile, long offset) throws SVNException { try { protoFileOS = SVNFileUtil.openFileForWriting(revisionPrototypeFile, true); FSID rootId = FSID.createTxnId("0", "0", myTxn.getTxnId()); CountingOutputStream revWriter = new CountingOutputStream(protoFileOS, offset); newRootId = txnRoot.writeFinalRevision(newRootId, revWriter, newRevision, rootId, startNodeId, startCopyId); long changedPathOffset = txnRoot.writeFinalChangedPathInfo(revWriter); String offsetsLine = "\n" + newRootId.getOffset() + " " + changedPathOffset + "\n"; protoFileOS.write(offsetsLine.getBytes("UTF-8")); } catch (IOException ioe) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, ioe.getLocalizedMessage()); SVNErrorManager.error(err, ioe, SVNLogType.FSFS); } finally { SVNFileUtil.closeFile(protoFileOS); } SVNProperties txnProps = myFSFS.getTransactionProperties(myTxn.getTxnId()); if (txnProps != null && !txnProps.isEmpty()) { if (txnProps.getStringValue(SVNProperty.TXN_CHECK_OUT_OF_DATENESS) != null) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNProperty.TXN_CHECK_OUT_OF_DATENESS, null); } if (txnProps.getStringValue(SVNProperty.TXN_CHECK_LOCKS) != null) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNProperty.TXN_CHECK_LOCKS, null); } } }
if (txnProps != null && !txnProps.isEmpty()) { if (txnProps.get(SVNProperty.TXN_CHECK_OUT_OF_DATENESS) != null) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNProperty.TXN_CHECK_OUT_OF_DATENESS, null); myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNProperty.TXN_CHECK_LOCKS, null); myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNRevisionProperty.DATE, commitTime);
if (txnProps != null && !txnProps.isEmpty()) { if (txnProps.getStringValue(SVNProperty.TXN_CHECK_OUT_OF_DATENESS) != null) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNProperty.TXN_CHECK_OUT_OF_DATENESS, null); myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNProperty.TXN_CHECK_LOCKS, null);
SVNProperties presetRevisionProperties = myFSFS.getTransactionProperties(myTxn.getTxnId()); if (presetRevisionProperties == null || !presetRevisionProperties.containsName(SVNRevisionProperty.DATE)) { myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNRevisionProperty.DATE, SVNPropertyValue.create(commitTime));
myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNRevisionProperty.DATE, SVNPropertyValue.create(commitTime));
myFSFS.setTransactionProperty(myTxn.getTxnId(), SVNRevisionProperty.DATE, SVNPropertyValue.create(commitTime));
if (currentAuthor == null) { try { fsfs.setTransactionProperty(txnName, SVNRevisionProperty.AUTHOR, SVNPropertyValue.create(userName)); } catch (SVNException svne) { throw DAVException.convertError(svne.getErrorMessage(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR,