public FSRevisionNode getRootRevisionNode() throws SVNException { if (myRootRevisionNode == null) { FSFile file = getOwner().getPackOrRevisionFSFile(getRevision()); try { loadOffsets(file); file.seek(myRootOffset); Map headers = file.readHeader(); myRootRevisionNode = FSRevisionNode.fromMap(headers); } finally { file.close(); } } return myRootRevisionNode; }
public FSRevisionNode getRootRevisionNode() throws SVNException { if (myRootRevisionNode == null) { FSFile file = getOwner().getPackOrRevisionFSFile(getRevision()); try { loadOffsets(file); file.seek(myRootOffset); Map headers = file.readHeader(); myRootRevisionNode = FSRevisionNode.fromMap(headers); } finally { file.close(); } } return myRootRevisionNode; }
public FSRevisionNode getRootRevisionNode() throws SVNException { if (myRootRevisionNode == null) { FSFile file = getOwner().getRevisionFile(getRevision()); try { loadOffsets(file); file.seek(myRootOffset); Map headers = file.readHeader(); myRootRevisionNode = FSRevisionNode.fromMap(headers); } finally { file.close(); } } return myRootRevisionNode; }
public FSRevisionNode getRevisionNode(FSID id) throws SVNException { FSFile revisionFile = null; if (id.isTxn()) { File file = new File(getTransactionDir(id.getTxnID()), PATH_PREFIX_NODE + id.getNodeID() + "." + id.getCopyID()); revisionFile = new FSFile(file); } else { revisionFile = getRevisionFile(id.getRevision()); revisionFile.seek(id.getOffset()); } Map headers = null; try { headers = revisionFile.readHeader(); } finally{ revisionFile.close(); } return FSRevisionNode.fromMap(headers); }
public FSRevisionNode getRootRevisionNode() throws SVNException { if (myRootRevisionNode == null) { if (false && isUseLogAddressing()) { FSRevisionNode rootRevisionNode = new FSRevisionNode(); rootRevisionNode.setId(FSID.createRevId(null, null, myRevision, FSID.ITEM_INDEX_ROOT_NODE)); rootRevisionNode.setType(SVNNodeKind.DIR); rootRevisionNode.setPredecessorId(null); rootRevisionNode.setCreatedPath("/"); myRootRevisionNode = rootRevisionNode; } else { FSFile file = getOwner().getPackOrRevisionFSFile(getRevision()); try { loadOffsets(file, FSID.ITEM_INDEX_ROOT_NODE); file.seek(myRootOffset); Map headers = file.readHeader(); myRootRevisionNode = FSRevisionNode.fromMap(headers); } finally { file.close(); } } } return myRootRevisionNode; }
public FSRevisionNode getRevisionNode(FSID id) throws SVNException { FSFile revisionFile = null; if (id.isTxn()) { File file = new File(getTransactionDir(id.getTxnID()), PATH_PREFIX_NODE + id.getNodeID() + "." + id.getCopyID()); revisionFile = new FSFile(file); } else { revisionFile = openAndSeekRevision(id.getRevision(), id.getOffset()); } Map headers = null; try { headers = revisionFile.readHeader(); } finally{ revisionFile.close(); } FSRevisionNode node = FSRevisionNode.fromMap(headers); if (node.isFreshTxnRoot()) { node.setFreshRootPredecessorId(node.getPredecessorId()); } return node; }
public FSRevisionNode getRevisionNode(FSID id) throws SVNException { FSFile revisionFile = null; if (id.isTxn()) { File file = new File(getTransactionDir(id.getTxnID()), PATH_PREFIX_NODE + id.getNodeID() + "." + id.getCopyID()); revisionFile = new FSFile(file); } else { revisionFile = openAndSeekRevision(id.getRevision(), id.getOffset()); } Map headers = null; try { headers = revisionFile.readHeader(); } finally{ revisionFile.close(); } FSRevisionNode node = FSRevisionNode.fromMap(headers); if (node.isFreshTxnRoot()) { node.setFreshRootPredecessorId(node.getPredecessorId()); } return node; }
public FSRevisionNode getRevisionNode(FSID id) throws SVNException { FSFile revisionFile = null; if (id.isTxn()) { File file = new File(getTransactionDir(id.getTxnID()), PATH_PREFIX_NODE + id.getNodeID() + "." + id.getCopyID()); revisionFile = new FSFile(file); } else { revisionFile = openAndSeekRevision(id.getRevision(), id.getOffset()); } Map headers = null; try { headers = revisionFile.readHeader(); } finally{ revisionFile.close(); } FSRevisionNode node = FSRevisionNode.fromMap(headers); if (node.isFreshTxnRoot()) { node.setFreshRootPredecessorId(node.getPredecessorId()); } return node; }