paths = paths == null || paths.length == 0 ? new String[] {""} : paths; SVNRepository repos = createRepository(url); long startRev = getRevisionNumber(startRevision, repos, null); long endRev = getRevisionNumber(endRevision, repos, null); repos.log(paths, startRev, endRev, reportPaths, stopOnCopy, limit, handler);
String[] urls = new String[paths.length]; for (int i = 0; i < paths.length; i++) { File path = paths[i]; SVNWCAccess wcAccess = createWCAccess(path); SVNEntry entry = wcAccess.getTargetEntry(); if (entry == null) { SVNErrorManager.error("svn: '" + path + "' is not under version control"); return; } if (entry.getURL() == null) { SVNErrorManager.error("svn: '" + path + "' has no URL"); } urls[i] = entry.getURL(); } if (urls.length == 0) { return; } Collection targets = new TreeSet(); String baseURL = SVNPathUtil.condenceURLs(urls, targets, true); if (baseURL == null || "".equals(baseURL)) { SVNErrorManager.error("svn: Entries belongs to different repositories"); } if (targets.isEmpty()) { targets.add(""); } SVNRepository repos = createRepository(baseURL); String[] targetPaths = (String[]) targets.toArray(new String[targets.size()]); for (int i = 0; i < targetPaths.length; i++) { targetPaths[i] = SVNEncodingUtil.uriDecode(targetPaths[i]); } if (startRevision.isLocal() || endRevision.isLocal()) { for (int i = 0; i < paths.length; i++) { long startRev = getRevisionNumber(startRevision, repos, paths[i]); long endRev = getRevisionNumber(endRevision, repos, paths[i]); repos.log(targetPaths, startRev, endRev, reportPaths, stopOnCopy, limit, handler); } } else { long startRev = getRevisionNumber(startRevision, repos, null); long endRev = getRevisionNumber(endRevision, repos, null); repos.log(targetPaths, startRev, endRev, reportPaths, stopOnCopy, limit, handler); }
    public void doLog(SVNURL url, String[] paths, SVNRevision startRevision, SVNRevision endRevision, boolean stopOnCopy, boolean reportPaths,             long limit, ISVNLogEntryHandler handler) throws SVNException {        if (startRevision.isValid() && !endRevision.isValid()) {            endRevision = startRevision;        } else if (!startRevision.isValid()) {            startRevision = SVNRevision.HEAD;            if (!endRevision.isValid()) {                endRevision = SVNRevision.create(0);            }        }        paths = paths == null || paths.length == 0 ? new String[] {""} : paths;        SVNRepository repos = createRepository(url);        long startRev = getRevisionNumber(startRevision, repos, null);        long endRev = getRevisionNumber(endRevision, repos, null);        repos.log(paths, startRev, endRev, reportPaths, stopOnCopy, limit, handler);    }