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(); } }