repository2 = createRepository(url2);
    private void doDiffURLURL(SVNURL url1, File path1, SVNRevision revision1, SVNURL url2, File path2, SVNRevision revision2, SVNRevision pegRevision,            boolean recursive, boolean useAncestry, OutputStream result) throws SVNException {        url1 = url1 == null ? getURL(path1) : url1;        url2 = url2 == null ? getURL(path2) : url2;        File basePath = null;        if (path1 != null) {            basePath = path1;        }        if (path2 != null) {            basePath = path2;        }        if (pegRevision.isValid()) {            SVNRepositoryLocation[] locations = getLocations(url2, path2, pegRevision, revision1, revision2);            url1 = locations[0].getURL();            url2 = locations[1].getURL();        }        SVNRepository repository1 = createRepository(url1);        SVNRepository repository2 = createRepository(url2);                final long rev1 = getRevisionNumber(revision1, repository1, path1);        long rev2 = getRevisionNumber(revision2, repository2, path2);                SVNNodeKind kind1 = repository1.checkPath("", rev1);        SVNNodeKind kind2 = repository2.checkPath("", rev2);        String target1 = null;        if (kind1 == SVNNodeKind.NONE) {            SVNErrorManager.error("svn: '" + url1 + "' was not found in the repository at revision " + rev1);        } else if (kind2 == SVNNodeKind.NONE) {            SVNErrorManager.error("svn: '" + url2 + "' was not found in the repository at revision " + rev2);        }        if (kind1 == SVNNodeKind.FILE || kind2 == SVNNodeKind.FILE) {            target1 = SVNPathUtil.tail(url1.getPath());            if (basePath != null) {                basePath = basePath.getParentFile();            }            url1 = SVNURL.parseURIEncoded(SVNPathUtil.removeTail(url1.toString()));            url2 = SVNURL.parseURIEncoded(SVNPathUtil.removeTail(url2.toString()));            repository1 = createRepository(url1);            repository2 = createRepository(url2);        }        File tmpFile = getDiffGenerator().createTempDirectory();        try {            SVNRemoteDiffEditor editor = new SVNRemoteDiffEditor(tmpFile, getDiffGenerator(), repository2, rev1, result);            ISVNReporterBaton reporter = new ISVNReporterBaton() {                public void report(ISVNReporter reporter) throws SVNException {                    reporter.setPath("", null, rev1, false);                    reporter.finishReport();                }            };            repository1.diff(url2, rev2, rev1, target1, !useAncestry, recursive, reporter, editor);        } finally {            if (tmpFile != null) {                SVNFileUtil.deleteAll(tmpFile);            }        }    }