public void writeFinalCurrentFile(long newRevision, String startNodeId, String startCopyId) throws SVNException, IOException { String[] txnIds = readNextIDs(); String txnNodeId = txnIds[0]; String txnCopyId = txnIds[1]; String newNodeId = FSTransactionRoot.addKeys(startNodeId, txnNodeId); String newCopyId = FSTransactionRoot.addKeys(startCopyId, txnCopyId); String line = newRevision + " " + newNodeId + " " + newCopyId + "\n"; File currentFile = getOwner().getCurrentFile(); File tmpCurrentFile = SVNFileUtil.createUniqueFile(currentFile.getParentFile(), currentFile.getName(), ".tmp"); OutputStream currentOS = null; try { currentOS = SVNFileUtil.openFileForWriting(tmpCurrentFile); currentOS.write(line.getBytes("UTF-8")); } finally { SVNFileUtil.closeFile(currentOS); } SVNFileUtil.rename(tmpCurrentFile, currentFile); }
public void writeFinalCurrentFile(long newRevision, String startNodeId, String startCopyId) throws SVNException, IOException { if (getOwner().getDBFormat() >= FSFS.MIN_NO_GLOBAL_IDS_FORMAT) { getOwner().writeCurrentFile(newRevision, null, null); return; } String[] txnIds = readNextIDs(); String txnNodeId = txnIds[0]; String txnCopyId = txnIds[1]; String newNodeId = FSTransactionRoot.addKeys(startNodeId, txnNodeId); String newCopyId = FSTransactionRoot.addKeys(startCopyId, txnCopyId); getOwner().writeCurrentFile(newRevision, newNodeId, newCopyId); }
public void writeFinalCurrentFile(long newRevision, String startNodeId, String startCopyId) throws SVNException, IOException { if (getOwner().getDBFormat() >= FSFS.MIN_NO_GLOBAL_IDS_FORMAT) { getOwner().writeCurrentFile(newRevision, null, null); return; } String[] txnIds = readNextIDs(); String txnNodeId = txnIds[0]; String txnCopyId = txnIds[1]; String newNodeId = FSTransactionRoot.addKeys(startNodeId, txnNodeId); String newCopyId = FSTransactionRoot.addKeys(startCopyId, txnCopyId); getOwner().writeCurrentFile(newRevision, newNodeId, newCopyId); }
public void writeFinalCurrentFile(long newRevision, String startNodeId, String startCopyId) throws SVNException, IOException { if (getOwner().getDBFormat() >= FSFS.MIN_NO_GLOBAL_IDS_FORMAT) { getOwner().writeCurrentFile(newRevision, null, null); return; } String[] txnIds = readNextIDs(); String txnNodeId = txnIds[0]; String txnCopyId = txnIds[1]; String newNodeId = FSTransactionRoot.addKeys(startNodeId, txnNodeId); String newCopyId = FSTransactionRoot.addKeys(startCopyId, txnCopyId); getOwner().writeCurrentFile(newRevision, newNodeId, newCopyId); }