public File getTransactionChangesFile() throws SVNException { if (myTxnChangesFile == null) { myTxnChangesFile = new File(getOwner().getTransactionDir(myTxnID), "changes"); } return myTxnChangesFile; }
public File getTransactionChangesFile() { if (myTxnChangesFile == null) { myTxnChangesFile = new File(getOwner().getTransactionDir(myTxnID), "changes"); } return myTxnChangesFile; }
public File getTransactionRevFile() { if (myTxnRevFile == null) { myTxnRevFile = new File(getOwner().getTransactionDir(myTxnID), FSFS.TXN_PATH_REV); } return myTxnRevFile; }
public File getTransactionProtoRevLockFile(String txnID) { if (myDBFormat >= MIN_PROTOREVS_DIR_FORMAT) { return new File(getTransactionProtoRevsDir(), txnID + ".rev-lock"); } return new File(getTransactionDir(txnID), "rev-lock"); }
public static File getIndexPath(FSFS fsfs, String txnId) { final File transactionDir = fsfs.getTransactionDir(txnId); return SVNFileUtil.createFilePath(transactionDir, FILENAME); }
public File getTransactionProtoRevLockFile(String txnID) { if (myDBFormat >= MIN_PROTOREVS_DIR_FORMAT) { return new File(getTransactionProtoRevsDir(), txnID + ".rev-lock"); } return new File(getTransactionDir(txnID), "rev-lock"); }
public File getTransactionProtoRevFile(String txnID) { if (myDBFormat >= MIN_PROTOREVS_DIR_FORMAT) { return new File(getTransactionProtoRevsDir(), txnID + ".rev"); } return new File(getTransactionDir(txnID), "rev"); }
public File getTransactionChangesFile() { if (myTxnChangesFile == null) { myTxnChangesFile = new File(getOwner().getTransactionDir(myTxnID), "changes"); } return myTxnChangesFile; }
private static File pathTxnSha1(FSFS fsfs, FSRepresentation representation, String txnId) { final String checksum = representation.getSHA1HexDigest(); final File transactionDirectory = fsfs.getTransactionDir(txnId); return SVNFileUtil.createFilePath(transactionDirectory, checksum); } }
public static void abortTransaction(FSFS fsfs, String txnId) throws SVNException { File txnDir = fsfs.getTransactionDir(txnId); SVNFileUtil.deleteAll(txnDir, true); if (txnDir.exists()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Transaction cleanup failed"); SVNErrorManager.error(err, SVNLogType.FSFS); } }
public static void abortTransaction(FSFS fsfs, String txnId) throws SVNException { File txnDir = fsfs.getTransactionDir(txnId); SVNFileUtil.deleteAll(txnDir, true); if (txnDir.exists()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Transaction cleanup failed"); SVNErrorManager.error(err); } }
public static void abortTransaction(FSFS fsfs, String txnId) throws SVNException { File txnDir = fsfs.getTransactionDir(txnId); SVNFileUtil.deleteAll(txnDir, true); if (txnDir.exists()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Transaction cleanup failed"); SVNErrorManager.error(err, SVNLogType.FSFS); } }
protected FSFile getTransactionRevisionNodeChildrenFile(FSID txnID) { File childrenFile = new File(getTransactionDir(txnID.getTxnID()), PATH_PREFIX_NODE + txnID.getNodeID() + "." + txnID.getCopyID() + TXN_PATH_EXT_CHILDREN); return new FSFile(childrenFile); }
protected FSFile getTransactionRevisionNodePropertiesFile(FSID id) { File revNodePropsFile = new File(getTransactionDir(id.getTxnID()), PATH_PREFIX_NODE + id.getNodeID() + "." + id.getCopyID() + TXN_PATH_EXT_PROPS); return new FSFile(revNodePropsFile); }
protected FSFile getTransactionRevisionNodeChildrenFile(FSID txnID) { File childrenFile = new File(getTransactionDir(txnID.getTxnID()), PATH_PREFIX_NODE + txnID.getNodeID() + "." + txnID.getCopyID() + TXN_PATH_EXT_CHILDREN); return new FSFile(childrenFile); }
private static FSTransactionInfo createTxn(long baseRevision, FSFS owner) throws SVNException { String txnID = createTxnDir(baseRevision, owner); FSTransactionInfo txn = new FSTransactionInfo(baseRevision, txnID); FSRevisionRoot root = owner.createRevisionRoot(baseRevision); FSRevisionNode rootNode = root.getRootRevisionNode(); owner.createNewTxnNodeRevisionFromRevision(txnID, rootNode); SVNFileUtil.createEmptyFile(new File(owner.getTransactionDir(txn.getTxnId()), FSFS.TXN_PATH_REV)); SVNFileUtil.createEmptyFile(new File(owner.getTransactionDir(txn.getTxnId()), "changes")); owner.writeNextIDs(txnID, "0", "0"); return txn; }
public void purgeTxn(String txnID) throws SVNException { SVNFileUtil.deleteAll(getTransactionDir(txnID), true); if (getDBFormat() >= FSFS.MIN_PROTOREVS_DIR_FORMAT) { SVNFileUtil.deleteFile(getTransactionProtoRevFile(txnID)); SVNFileUtil.deleteFile(getTransactionProtoRevLockFile(txnID)); } }
public void purgeTxn(String txnID) throws SVNException { SVNFileUtil.deleteAll(getTransactionDir(txnID), true); if (getDBFormat() >= FSFS.MIN_PROTOREVS_DIR_FORMAT) { SVNFileUtil.deleteFile(getTransactionProtoRevFile(txnID)); SVNFileUtil.deleteFile(getTransactionProtoRevLockFile(txnID)); } }
public FSTransactionInfo openTxn(String txnName) throws SVNException { SVNFileType kind = SVNFileType.getType(getTransactionDir(txnName)); if (kind != SVNFileType.DIRECTORY) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_TRANSACTION, "No such transaction"); SVNErrorManager.error(err, SVNLogType.FSFS); } FSTransactionRoot txnRoot = new FSTransactionRoot(this, txnName, -1, 0); FSTransactionInfo localTxn = txnRoot.getTxn(); return new FSTransactionInfo(localTxn.getBaseRevision(), txnName); }
public FSTransactionInfo openTxn(String txnName) throws SVNException { SVNFileType kind = SVNFileType.getType(getTransactionDir(txnName)); if (kind != SVNFileType.DIRECTORY) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_TRANSACTION, "No such transaction"); SVNErrorManager.error(err, SVNLogType.FSFS); } FSTransactionRoot txnRoot = new FSTransactionRoot(this, txnName, -1, 0); FSTransactionInfo localTxn = txnRoot.getTxn(); return new FSTransactionInfo(localTxn.getBaseRevision(), txnName); }