SVNRepository repository = createRepository(anchorURL, null, null, true);
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 /* reverse */,
revision2 == SVNRevision.BASE || revision2 == SVNRevision.COMMITTED /* compare to base */,
depth, changeLists);
ISVNEditor filterEditor = SVNAmbientDepthFilterEditor.wrap(editor, info, depth, false);
boolean serverSupportsDepth = repository.hasCapability(SVNCapability.DEPTH);
SVNReporter reporter = new SVNReporter(info, info.getAnchor().getFile(info.getTargetName()),
false, !serverSupportsDepth, depth, false, false, getDebugLog());
// this should be rev2.
long pegRevisionNumber = getRevisionNumber(revision2, repository, path2);
try {
repository.diff(url1, revNumber, pegRevisionNumber, target, !useAncestry, depth, true, reporter, SVNCancellableEditor.newInstance(filterEditor, this, getDebugLog()));
} finally {
editor.cleanup();
}
} finally {
wcAccess.close();
}
}