DebugLog.log("repos location " + repos.getLocation());
    public String getURL(String url, SVNRevision peg, SVNRevision rev)            throws SVNException {        if (rev == null || !rev.isValid()) {            rev = SVNRevision.HEAD;        }        if (rev.equals(peg)) {            return url;        }        if (peg == null || !peg.isValid()) {            return url;        }        DebugLog.log("creating repos for " + url);        SVNRepository repos = createRepository(url);        DebugLog.log("repos location " + repos.getLocation());        long pegRevNumber = getRevisionNumber(url, peg);        long revNumber = getRevisionNumber(url, rev);        SVNNodeKind kind = repos.checkPath("", pegRevNumber);        DebugLog.log("node kind: " + kind);        List locations = new ArrayList(1);        try {            locations = (List) repos.getLocations("", locations, pegRevNumber,                    new long[] { revNumber });        } catch (SVNException e) {            DebugLog.error(e);            SVNErrorManager                    .error("svn: Unable to find repository location for '"                            + url + "' in revision " + revNumber);            return null;        }        if (locations == null || locations.size() != 1) {            SVNErrorManager                    .error("svn: Unable to find repository location for '"                            + url + "' in revision " + revNumber);            return null;        }        SVNLocationEntry location = (SVNLocationEntry) locations.get(0);        String path = PathUtil.encode(location.getPath());        DebugLog.log("fetched path: " + path);        String rootPath = repos.getRepositoryRoot();        DebugLog.log("root path: " + rootPath);        String fullPath = SVNRepositoryLocation.parseURL(PathUtil.decode(url))                .getPath();        DebugLog.log("full path: " + fullPath);        url = url.substring(0, url.length() - fullPath.length());        DebugLog.log("host: " + url);        url = PathUtil.append(url, rootPath);        url = PathUtil.append(url, path);        DebugLog.log("fetched location: " + url);        return url;    }