private void loadOffsets(FSFile file) throws SVNException { if (myRootOffset >= 0) { return; } long[] rootOffset = { -1 }; long[] changesOffset = { -1 }; FSRepositoryUtil.loadRootChangesOffset(getOwner(), getRevision(), file, rootOffset, changesOffset); myRootOffset = rootOffset[0]; myChangesOffset = changesOffset[0]; }
private static void replaceFileOrDir(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { long baseRevision = srcRoot.getRevision(); if (tgtKind == SVNNodeKind.DIR) { editor.openDir(editPath, baseRevision); deltifyDirs(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath); editor.closeDir(); } else { editor.openFile(editPath, baseRevision); deltifyFiles(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); editor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
private static void replaceFileOrDir(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { long baseRevision = srcRoot.getRevision(); if (tgtKind == SVNNodeKind.DIR) { editor.openDir(editPath, baseRevision); deltifyDirs(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath); editor.closeDir(); } else { editor.openFile(editPath, baseRevision); deltifyFiles(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); editor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
private void loadOffsets(FSFile file) throws SVNException { if (myRootOffset >= 0) { return; } long[] rootOffset = { -1 }; long[] changesOffset = { -1 }; FSRepositoryUtil.loadRootChangesOffset(getOwner(), getRevision(), file, rootOffset, changesOffset); myRootOffset = rootOffset[0]; myChangesOffset = changesOffset[0]; }
private static void replaceFileOrDir(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { long baseRevision = srcRoot.getRevision(); if (tgtKind == SVNNodeKind.DIR) { editor.openDir(editPath, baseRevision); deltifyDirs(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath); editor.closeDir(); } else { editor.openFile(editPath, baseRevision); deltifyFiles(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); editor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
public static SVNErrorMessage errorNotFound(FSRoot root, String path) { SVNErrorMessage err; if (root instanceof FSTransactionRoot) { FSTransactionRoot txnRoot = (FSTransactionRoot) root; err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "File not found: transaction ''{0}'', path ''{1}''", new Object[] { txnRoot.getTxnID(), path }); } else { FSRevisionRoot revRoot = (FSRevisionRoot) root; err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "File not found: revision {0}, path ''{1}''", new Object[] { new Long(revRoot.getRevision()), path }); } return err; }
private void replaceFileOrDir(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { long baseRevision = srcRoot.getRevision(); if (tgtKind == SVNNodeKind.DIR) { myEditor.openDir(editPath, baseRevision); deltifyDirs(srcRoot, tgtRoot, srcPath, tgtPath, editPath); myEditor.closeDir(); } else { myEditor.openFile(editPath, baseRevision); deltifyFiles(srcRoot, tgtRoot, srcPath, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); myEditor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
public static SVNErrorMessage errorNotFound(FSRoot root, String path) { SVNErrorMessage err; if (root instanceof FSTransactionRoot) { FSTransactionRoot txnRoot = (FSTransactionRoot) root; err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "File not found: transaction ''{0}'', path ''{1}''", new Object[] { txnRoot.getTxnID(), path }); } else { FSRevisionRoot revRoot = (FSRevisionRoot) root; err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "File not found: revision {0}, path ''{1}''", new Object[] { new Long(revRoot.getRevision()), path }); } return err; }
private void replaceFileOrDir(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { long baseRevision = srcRoot.getRevision(); if (tgtKind == SVNNodeKind.DIR) { myEditor.openDir(editPath, baseRevision); deltifyDirs(srcRoot, tgtRoot, srcPath, tgtPath, editPath); myEditor.closeDir(); } else { myEditor.openFile(editPath, baseRevision); deltifyFiles(srcRoot, tgtRoot, srcPath, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); myEditor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
public Map getChangedPaths() throws SVNException { FSFile file = getOwner().getPackOrRevisionFSFile(getRevision()); try { loadOffsets(file, FSID.ITEM_INDEX_CHANGES); file.seek(myChangesOffset); return fetchAllChanges(file, true); } finally { file.close(); } }
private void replaceFileOrDir(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { long baseRevision = srcRoot.getRevision(); if (tgtKind == SVNNodeKind.DIR) { myEditor.openDir(editPath, baseRevision); deltifyDirs(srcRoot, tgtRoot, srcPath, tgtPath, editPath); myEditor.closeDir(); } else { myEditor.openFile(editPath, baseRevision); deltifyFiles(srcRoot, tgtRoot, srcPath, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); myEditor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
public Map getChangedPaths() throws SVNException { FSFile file = getOwner().getRevisionFile(getRevision()); loadOffsets(file); try { file.seek(myChangesOffset); return fetchAllChanges(file, true); } finally { file.close(); } }
public Map getChangedPaths() throws SVNException { FSFile file = getOwner().getPackOrRevisionFSFile(getRevision()); try { loadOffsets(file); file.seek(myChangesOffset); return fetchAllChanges(file, true); } finally { file.close(); } }
public Map getChangedPaths() throws SVNException { FSFile file = getOwner().getPackOrRevisionFSFile(getRevision()); try { loadOffsets(file); file.seek(myChangesOffset); return fetchAllChanges(file, true); } finally { file.close(); } }
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 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 FSNodeHistory getNodeHistory(String path) throws SVNException { SVNNodeKind kind = checkNodeKind(path); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorNotFound(this, path), SVNLogType.FSFS); } return new FSNodeHistory(new SVNLocationEntry(getRevision(), SVNPathUtil.canonicalizeAbsolutePath(path)), false, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), getOwner()); }
public FSNodeHistory getNodeHistory(String path) throws SVNException { SVNNodeKind kind = checkNodeKind(path); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorNotFound(this, path), SVNLogType.FSFS); } return new FSNodeHistory(new SVNLocationEntry(getRevision(), SVNPathUtil.canonicalizeAbsolutePath(path)), false, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), getOwner()); }
public FSNodeHistory getNodeHistory(String path) throws SVNException { SVNNodeKind kind = checkNodeKind(path); if (kind == SVNNodeKind.NONE) { SVNErrorManager.error(FSErrors.errorNotFound(this, path), SVNLogType.FSFS); } return new FSNodeHistory(new SVNLocationEntry(getRevision(), SVNPathUtil.canonicalizeAbsolutePath(path)), false, new SVNLocationEntry(SVNRepository.INVALID_REVISION, null), getOwner()); }