public String getMD5Checksum(String path) throws SVNException { path = path == null ? getResourceURI().getPath() : path; FSRevisionNode node = myRoot.getRevisionNode(path); return node.getFileMD5Checksum(); }
private static void deltifyFiles(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath) throws SVNException { deltifyProperties(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath, false); boolean changed = false; if (srcPath != null) { changed = FSRepositoryUtil.areFileContentsChanged(srcRoot, srcPath, tgtRoot, tgtPath); } if (changed) { String srcHexDigest = null; if (srcPath != null) { FSRevisionNode srcNode = srcRoot.getRevisionNode(srcPath); srcHexDigest = srcNode.getFileMD5Checksum(); } editor.applyTextDelta(editPath, srcHexDigest); editor.textDeltaChunk(editPath, SVNDiffWindow.EMPTY); } }
private static void deltifyFiles(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath) throws SVNException { deltifyProperties(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath, false); boolean changed = false; if (srcPath != null) { changed = FSRepositoryUtil.areFileContentsChanged(srcRoot, srcPath, tgtRoot, tgtPath); } if (changed) { String srcHexDigest = null; if (srcPath != null) { FSRevisionNode srcNode = srcRoot.getRevisionNode(srcPath); srcHexDigest = srcNode.getFileMD5Checksum(); } editor.applyTextDelta(editPath, srcHexDigest); editor.textDeltaChunk(editPath, SVNDiffWindow.EMPTY); } }
private static void deltifyFiles(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath) throws SVNException { deltifyProperties(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath, false); boolean changed = false; if (srcPath != null) { changed = FSRepositoryUtil.areFileContentsChanged(srcRoot, srcPath, tgtRoot, tgtPath); } if (changed) { String srcHexDigest = null; if (srcPath != null) { FSRevisionNode srcNode = srcRoot.getRevisionNode(srcPath); srcHexDigest = srcNode.getFileMD5Checksum(); } editor.applyTextDelta(editPath, srcHexDigest); editor.textDeltaChunk(editPath, SVNDiffWindow.EMPTY); } }
private void deltifyFiles(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath) throws SVNException { deltifyProperties(srcRoot, tgtRoot, srcPath, tgtPath, editPath, false); boolean changed = false; if (srcPath != null) { if (myIsIgnoreAncestry) { changed = FSRepositoryUtil.checkFilesDifferent(srcRoot, srcPath, tgtRoot, tgtPath, myDeltaCombiner); } else { changed = FSRepositoryUtil.areFileContentsChanged(srcRoot, srcPath, tgtRoot, tgtPath); } } if (changed) { String srcHexDigest = null; if (srcPath != null) { FSRevisionNode srcNode = srcRoot.getRevisionNode(srcPath); srcHexDigest = srcNode.getFileMD5Checksum(); } FSRepositoryUtil.sendTextDelta(myEditor, editPath, srcPath, srcHexDigest, srcRoot, tgtPath, tgtRoot, myIsSendTextDeltas, myDeltaCombiner, myDeltaGenerator, myFSFS); } }
private void deltifyFiles(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath) throws SVNException { deltifyProperties(srcRoot, tgtRoot, srcPath, tgtPath, editPath, false); boolean changed = false; if (srcPath != null) { if (myIsIgnoreAncestry) { changed = FSRepositoryUtil.checkFilesDifferent(srcRoot, srcPath, tgtRoot, tgtPath, myDeltaCombiner); } else { changed = FSRepositoryUtil.areFileContentsChanged(srcRoot, srcPath, tgtRoot, tgtPath); } } if (changed) { String srcHexDigest = null; if (srcPath != null) { FSRevisionNode srcNode = srcRoot.getRevisionNode(srcPath); srcHexDigest = srcNode.getFileMD5Checksum(); } FSRepositoryUtil.sendTextDelta(myEditor, editPath, srcPath, srcHexDigest, srcRoot, tgtPath, tgtRoot, myIsSendTextDeltas, myDeltaCombiner, myDeltaGenerator, myFSFS); } }
private void deltifyFiles(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath) throws SVNException { deltifyProperties(srcRoot, tgtRoot, srcPath, tgtPath, editPath, false); boolean changed = false; if (srcPath != null) { if (myIsIgnoreAncestry) { changed = FSRepositoryUtil.checkFilesDifferent(srcRoot, srcPath, tgtRoot, tgtPath, myDeltaCombiner); } else { changed = FSRepositoryUtil.areFileContentsChanged(srcRoot, srcPath, tgtRoot, tgtPath); } } if (changed) { String srcHexDigest = null; if (srcPath != null) { FSRevisionNode srcNode = srcRoot.getRevisionNode(srcPath); srcHexDigest = srcNode.getFileMD5Checksum(); } FSRepositoryUtil.sendTextDelta(myEditor, editPath, srcPath, srcHexDigest, srcRoot, tgtPath, tgtRoot, myIsSendTextDeltas, myDeltaCombiner, myDeltaGenerator, myFSFS); } }
private static void addFileOrDir(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { if (tgtKind == SVNNodeKind.DIR) { editor.addDir(editPath, null, -1); deltifyDirs(fsfs, editor, srcRoot, tgtRoot, null, tgtPath, editPath); editor.closeDir(); } else { editor.addFile(editPath, null, -1); deltifyFiles(fsfs, editor, srcRoot, tgtRoot, null, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); editor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
private void addFileOrDir(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { if (tgtKind == SVNNodeKind.DIR) { myEditor.addDir(editPath, null, -1); deltifyDirs(srcRoot, tgtRoot, null, tgtPath, editPath); myEditor.closeDir(); } else { myEditor.addFile(editPath, null, -1); deltifyFiles(srcRoot, tgtRoot, null, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); myEditor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
private static void addFileOrDir(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { if (tgtKind == SVNNodeKind.DIR) { editor.addDir(editPath, null, -1); deltifyDirs(fsfs, editor, srcRoot, tgtRoot, null, tgtPath, editPath); editor.closeDir(); } else { editor.addFile(editPath, null, -1); deltifyFiles(fsfs, editor, srcRoot, tgtRoot, null, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); editor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
private void addFileOrDir(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { if (tgtKind == SVNNodeKind.DIR) { myEditor.addDir(editPath, null, -1); deltifyDirs(srcRoot, tgtRoot, null, tgtPath, editPath); myEditor.closeDir(); } else { myEditor.addFile(editPath, null, -1); deltifyFiles(srcRoot, tgtRoot, null, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); myEditor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
private void addFileOrDir(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { if (tgtKind == SVNNodeKind.DIR) { myEditor.addDir(editPath, null, -1); deltifyDirs(srcRoot, tgtRoot, null, tgtPath, editPath); myEditor.closeDir(); } else { myEditor.addFile(editPath, null, -1); deltifyFiles(srcRoot, tgtRoot, null, tgtPath, editPath); FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath); myEditor.closeFile(editPath, tgtNode.getFileMD5Checksum()); } }
private static void addFileOrDir(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String tgtPath, String editPath, SVNNodeKind tgtKind) throws SVNException { if (tgtKind == SVNNodeKind.DIR) { editor.addDir(editPath, null, -1); deltifyDirs(fsfs, editor, srcRoot, tgtRoot, null, tgtPath, editPath); editor.closeDir(); } else { editor.addFile(editPath, null, -1); deltifyFiles(fsfs, editor, srcRoot, tgtRoot, null, 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 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 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()); } }
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 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()); } }
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()); } }
private void diffFiles(long sourceRevision, String sourcePath, String targetPath, String editPath, String lockToken) throws SVNException { diffProplists(sourceRevision, sourcePath, editPath, targetPath, lockToken, false); String sourceHexDigest = null; FSRevisionRoot sourceRoot = null; if (sourcePath != null) { sourceRoot = getSourceRoot(sourceRevision); boolean changed = false; if (isIgnoreAncestry()) { changed = FSRepositoryUtil.checkFilesDifferent(sourceRoot, sourcePath, getTargetRoot(), targetPath, myDeltaCombiner); } else { changed = FSRepositoryUtil.areFileContentsChanged(sourceRoot, sourcePath, getTargetRoot(), targetPath); } if (!changed) { return; } FSRevisionNode sourceNode = sourceRoot.getRevisionNode(sourcePath); sourceHexDigest = sourceNode.getFileMD5Checksum(); } FSRepositoryUtil.sendTextDelta(getEditor(), editPath, sourcePath, sourceHexDigest, sourceRoot, targetPath, getTargetRoot(), isSendTextDeltas(), myDeltaCombiner, myDeltaGenerator, myFSFS); }