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, 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, 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(); } }
getDiffGenerator(), reverse ? -1 : revNumber, reverse ? revNumber : -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback, useAncestry, reverse /* reverse */,
long revNumber = getRevisionNumber(revision1, repository, null); AbstractDiffCallback callback = new SVNDiffCallback(info.getAnchor(), getDiffGenerator(), reverse ? -1 : revNumber, reverse ? revNumber : -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback, useAncestry, reverse, revision2 == SVNRevision.BASE || revision2 == SVNRevision.COMMITTED, depth, changeLists); boolean serverSupportsDepth = repository.hasCapability(SVNCapability.DEPTH); SVNReporter reporter = new SVNReporter(info, info.getAnchor().getFile(info.getTargetName()), false, !serverSupportsDepth, depth, false, false, true, getDebugLog());
getDiffGenerator(), reverse ? -1 : revNumber, reverse ? revNumber : -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback, useAncestry, reverse /* reverse */,
AbstractDiffCallback callback = new SVNDiffCallback(info, getDiffGenerator(), reverse ? -1 : revNumber, reverse ? revNumber : -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback,
AbstractDiffCallback callback = new SVNDiffCallback(info, getDiffGenerator(), reverse ? -1 : revNumber, reverse ? revNumber : -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback, useAncestry,
long revNumber = getRevisionNumber(revision1, repository, path1); AbstractDiffCallback callback = new SVNDiffCallback(info.getAnchor(), getDiffGenerator(), reverse ? -1 : revNumber, reverse ? revNumber : -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback, useAncestry, reverse, revision2 == SVNRevision.BASE || revision2 == SVNRevision.COMMITTED, depth, changeLists); ISVNEditor filterEditor = SVNAmbientDepthFilterEditor.wrap(editor, info, false); boolean serverSupportsDepth = repository.hasCapability(SVNCapability.DEPTH);
getDiffGenerator(), reverse ? -1 : revNumber, reverse ? revNumber : -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback, useAncestry, reverse /* reverse */,
getDiffGenerator(), reverse ? -1 : revNumber, reverse ? revNumber : -1, result); SVNDiffEditor editor = new SVNDiffEditor(wcAccess, info, callback, useAncestry, reverse /* reverse */,