SVNDebugLog.getDefaultLog().info("diff url:wc " + revision1 + ":" + revision2);
    private void doDiffURLWC(SVNURL url1, SVNRevision revision1, SVNRevision pegRevision, File path2, SVNRevision revision2,             boolean reverse, boolean recursive, boolean useAncestry, OutputStream result) throws SVNException {        SVNWCAccess wcAccess = createWCAccess();        SVNDebugLog.getDefaultLog().info("diff url:wc " + revision1 + ":" + revision2);        try {            SVNAdminAreaInfo info = wcAccess.openAnchor(path2, false, recursive ? SVNWCAccess.INFINITE_DEPTH : 0);            File anchorPath = info.getAnchor().getRoot();            String target = "".equals(info.getTargetName()) ? null : info.getTargetName();                        SVNEntry anchorEntry = info.getAnchor().getEntry("", false);            if (anchorEntry == null) {                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_NOT_FOUND, "''{0}'' is not under version control", anchorPath);                SVNErrorManager.error(err);            } else if (anchorEntry.getURL() == null) {                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_MISSING_URL, "''{0}'' has no URL", anchorPath);                SVNErrorManager.error(err);            }            SVNURL anchorURL = anchorEntry.getSVNURL();            if (pegRevision.isValid()) {                SVNRepositoryLocation[] locations = getLocations(url1, null, null, pegRevision, revision1, SVNRevision.UNDEFINED);                url1 = locations[0].getURL();                String anchorPath2 = SVNPathUtil.append(anchorURL.toString(), target == null ? "" : target);                getDiffGenerator().init(url1.toString(), anchorPath2);            }            SVNRepository repository = createRepository(anchorURL, true);            long revNumber = getRevisionNumber(revision1, repository, null);            AbstractDiffCallback callback = new SVNDiffCallback(info, 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 */,                     recursive);            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()));            } finally {                editor.cleanup();            }        } finally {            wcAccess.close();        }    }