private void doDiffWCWC(File path1, SVNRevision revision1, File path2, SVNRevision revision2, SVNDepth depth, boolean useAncestry, OutputStream result, Collection changeLists) throws SVNException { if (!path1.equals(path2) || !(revision1 == SVNRevision.BASE && revision2 == SVNRevision.WORKING)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE, "Only diffs between a path's text-base and its working files are supported at this time (-rBASE:WORKING)"); SVNErrorManager.error(err, SVNLogType.WC); } SVNWCAccess wcAccess = createWCAccess(); try { int admDepth = getAdminDepth(depth); SVNAdminAreaInfo info = wcAccess.openAnchor(path1, false, admDepth); wcAccess.getVersionedEntry(path1, false); long rev = getRevisionNumber(revision1, null, path1); AbstractDiffCallback callback = new SVNDiffCallback(info.getAnchor(), getDiffGenerator(), rev, -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback, useAncestry, false, false, depth, changeLists); try { editor.closeEdit(); } finally { editor.cleanup(); } } finally { wcAccess.close(); } }
private File loadFile(SVNURL url, File path, SVNRevision revision, Map properties, SVNAdminAreaInfo info, long[] revNumber) throws SVNException { String name = info.getTargetName(); File tmpDir = info.getAnchor().getRoot(); File result = SVNFileUtil.createUniqueFile(tmpDir, name, ".tmp"); SVNFileUtil.createEmptyFile(result); SVNRepository repository = createRepository(url, true); long revisionNumber = getRevisionNumber(revision, repository, path); OutputStream os = null; try { os = SVNFileUtil.openFileForWriting(result); repository.getFile("", revisionNumber, properties, new SVNCancellableOutputStream(os, this)); } finally { SVNFileUtil.closeFile(os); } if (revNumber != null && revNumber.length > 0) { revNumber[0] = revisionNumber; } return result; }
private void doDiffWCWC(File path1, SVNRevision revision1, File path2, SVNRevision revision2, SVNDepth depth, boolean useAncestry, OutputStream result, Collection changeLists) throws SVNException { if (!path1.equals(path2) || !(revision1 == SVNRevision.BASE && revision2 == SVNRevision.WORKING)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE, "Only diffs between a path's text-base and its working files are supported at this time (-rBASE:WORKING)"); SVNErrorManager.error(err, SVNLogType.WC); } SVNWCAccess wcAccess = createWCAccess(); try { int admDepth = getAdminDepth(depth); SVNAdminAreaInfo info = wcAccess.openAnchor(path1, false, admDepth); wcAccess.getVersionedEntry(path1, false); long rev = getRevisionNumber(revision1, null, path1); AbstractDiffCallback callback = new SVNDiffCallback(info.getAnchor(), getDiffGenerator(), rev, -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback, useAncestry, false, false, depth, changeLists); try { editor.closeEdit(); } finally { editor.cleanup(); } } finally { wcAccess.close(); } }
private void doDiffWCWC(File path1, SVNRevision revision1, File path2, SVNRevision revision2, boolean recursive, boolean useAncestry, OutputStream result) throws SVNException { if (!path1.equals(path2) || !(revision1 == SVNRevision.BASE && revision2 == SVNRevision.WORKING)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE, "Only diffs between a path's text-base " + "and its working files are supported at this time (-rBASE:WORKING)"); SVNErrorManager.error(err); } SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminAreaInfo info = wcAccess.openAnchor(path1, false, recursive ? SVNWCAccess.INFINITE_DEPTH: 0); SVNEntry entry = wcAccess.getEntry(path1, false); if (entry == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_NOT_FOUND, "''{0}'' is not under version control", path1); SVNErrorManager.error(err); } long rev = getRevisionNumber(revision1, null, path1); AbstractDiffCallback callback = new SVNDiffCallback(info, getDiffGenerator(), rev, -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback, useAncestry, false, false, recursive); try { editor.closeEdit(); } finally { editor.cleanup(); } } finally { wcAccess.close(); } }
final long rev1 = getRevisionNumber(revision1, repository1, path1); long rev2 = getRevisionNumber(revision2, repository1, path2); SVNRepository repository2 = createRepository(url1, false);
SVNRepository repository2 = createRepository(url2, false); final long rev1 = getRevisionNumber(revision1, repository1, path1); long rev2 = getRevisionNumber(revision2, repository2, path2);
SVNRepository repository2 = createRepository(url2, false); final long rev1 = getRevisionNumber(revision1, repository1, path1); long rev2 = getRevisionNumber(revision2, repository2, path2);
SVNRepository repository2 = createRepository(url2, null, null, false); final long rev1 = getRevisionNumber(revision1, repository1, path1); long rev2 = -1; SVNNodeKind kind1 = null; rev2 = getRevisionNumber(revision2, repository2, path2);
SVNRepository repository2 = createRepository(url2, null, null, false); final long rev1 = getRevisionNumber(revision1, repository1, path1); long rev2 = -1; SVNNodeKind kind1 = null; rev2 = getRevisionNumber(revision2, repository2, path2);
SVNRepository repository2 = createRepository(url2, null, null, false); final long rev1 = getRevisionNumber(revision1, repository1, path1); long rev2 = -1; String target1 = null; SVNNodeKind kind2 = null; try { rev2 = getRevisionNumber(revision2, repository2, path2); kind1 = repository1.checkPath("", rev1); kind2 = repository2.checkPath("", rev2);
SVNRepository repository2 = createRepository(url2, null, null, false); final long rev1 = getRevisionNumber(revision1, repository1, path1); long rev2 = -1; String target1 = null; SVNNodeKind kind2 = null; try { rev2 = getRevisionNumber(revision2, repository2, path2); kind1 = repository1.checkPath("", rev1); kind2 = repository2.checkPath("", rev2);
long revNumber = getRevisionNumber(revision1, repository, null); AbstractDiffCallback callback = new SVNDiffCallback(info.getAnchor(), getDiffGenerator(), !serverSupportsDepth, depth, false, false, true, getDebugLog()); long pegRevisionNumber = getRevisionNumber(revision2, repository, path2); try { repository.diff(url1, revNumber, pegRevisionNumber, target, !useAncestry, depth, true, reporter, SVNCancellableEditor.newInstance(editor, this, getDebugLog()));
long revNumber = getRevisionNumber(revision1, repository, null); AbstractDiffCallback callback = new SVNDiffCallback(info.getAnchor(), getDiffGenerator(), !serverSupportsDepth, depth, false, false, true, getDebugLog()); long pegRevisionNumber = getRevisionNumber(revision2, repository, path2); try { repository.diff(url1, revNumber, pegRevisionNumber, target, !useAncestry, depth, true, reporter, SVNCancellableEditor.newInstance(editor, this, getDebugLog()));
long revNumber = getRevisionNumber(revision1, repository, null); AbstractDiffCallback callback = new SVNDiffCallback(info, getDiffGenerator(), reverse ? -1 : revNumber, reverse ? revNumber : -1, result); SVNReporter reporter = new SVNReporter(info, info.getAnchor().getFile(info.getTargetName()), false, recursive, getDebugLog()); long pegRevisionNumber = getRevisionNumber(revision2, repository, path2); try { repository.diff(url1, revNumber, pegRevisionNumber, target, !useAncestry, recursive, true, reporter, SVNCancellableEditor.newInstance(editor, this, getDebugLog()));
long revNumber = getRevisionNumber(revision1, repository, path1); AbstractDiffCallback callback = new SVNDiffCallback(info, getDiffGenerator(), reverse ? -1 : revNumber, reverse ? revNumber : -1, result); long pegRevisionNumber = getRevisionNumber(revision2, repository, path2); try { repository.diff(url1, revNumber, pegRevisionNumber, target, !useAncestry, recursive, true, reporter, SVNCancellableEditor.newInstance(editor, this, getDebugLog()));
long revNumber = getRevisionNumber(revision1, repository, path1); AbstractDiffCallback callback = new SVNDiffCallback(info.getAnchor(), getDiffGenerator(), long pegRevisionNumber = getRevisionNumber(revision2, repository, path2); try { repository.diff(url1, revNumber, pegRevisionNumber, target, !useAncestry, depth, true, reporter, SVNCancellableEditor.newInstance(filterEditor, this, getDebugLog()));
long revNumber = getRevisionNumber(revision1, repository, path1); AbstractDiffCallback callback = new SVNDiffCallback(info.getAnchor(), getDiffGenerator(), long pegRevisionNumber = getRevisionNumber(revision2, repository, path2); try { repository.diff(url1, revNumber, pegRevisionNumber, target, !useAncestry, depth, true, reporter, SVNCancellableEditor.newInstance(filterEditor, this, getDebugLog()));