if (e.getMessage().indexOf("The requested report is unknown") >= 0 || e.getMessage().indexOf("Unknown command 'get-locations'") >= 0) {
if (e.getErrorMessage() != null && e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_NOT_IMPLEMENTED) {
    protected SVNRepositoryLocation[] getLocations(SVNURL url, File path, SVNRevision revision, SVNRevision start, SVNRevision end) throws SVNException {        if (!revision.isValid() || !start.isValid()) {            SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CLIENT_BAD_REVISION));        }        long pegRevisionNumber = -1;        long startRevisionNumber;        long endRevisionNumber;        if (url != null && path != null) {            SVNDebugLog.logInfo("possibly, not valid getLocations call:");            SVNDebugLog.logInfo(new Exception());        }                if (path != null && url == null) {            SVNWCAccess wcAccess = createWCAccess(path);            SVNEntry entry = wcAccess.getTargetEntry();            if (entry.getCopyFromURL() != null && revision == SVNRevision.WORKING) {                url = entry.getCopyFromSVNURL();                pegRevisionNumber = entry.getCopyFromRevision();            } else if (entry.getURL() != null){                url = entry.getSVNURL();            } else {                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_MISSING_URL, "''{0}'' has no URL", path);                SVNErrorManager.error(err);            }        }        SVNRepository repository = createRepository(url, true);        if (pegRevisionNumber < 0) {            pegRevisionNumber = getRevisionNumber(revision, repository, path);        }        if (revision == start && revision == SVNRevision.HEAD) {            startRevisionNumber = pegRevisionNumber;        } else {            startRevisionNumber = getRevisionNumber(start, repository, path);        }        if (!end.isValid()) {            endRevisionNumber = startRevisionNumber;        } else {            endRevisionNumber = getRevisionNumber(end, repository, path);        }        if (endRevisionNumber == pegRevisionNumber && startRevisionNumber == pegRevisionNumber) {            SVNRepositoryLocation[] result = new SVNRepositoryLocation[2];            result[0] = new SVNRepositoryLocation(url, startRevisionNumber);            result[1] = new SVNRepositoryLocation(url, endRevisionNumber);            return result;        }        SVNURL rootURL = repository.getRepositoryRoot(true);        long[] revisionsRange = startRevisionNumber == endRevisionNumber ?                 new long[] {startRevisionNumber} : new long[] {startRevisionNumber, endRevisionNumber};                                Map locations = null;        try {            locations = repository.getLocations("", (Map) null, pegRevisionNumber, revisionsRange);        } catch (SVNException e) {            if (e.getMessage().indexOf("The requested report is unknown") >= 0 ||                    e.getMessage().indexOf("Unknown command 'get-locations'") >= 0) {                locations = getLocations10(repository, pegRevisionNumber, startRevisionNumber, endRevisionNumber);            } else {                throw e;            }        }        // try to get locations with 'log' method.        SVNLocationEntry startPath = (SVNLocationEntry) locations.get(new Long(startRevisionNumber));        SVNLocationEntry endPath = (SVNLocationEntry) locations.get(new Long(endRevisionNumber));                if (startPath == null) {            Object source = path != null ? (Object) path : (Object) url;            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_UNRELATED_RESOURCES, "Unable to find repository location for ''{0}'' in revision ''{1}''", new Object[] {source, new Long(startRevisionNumber)});            SVNErrorManager.error(err);        }        if (endPath == null) {            Object source = path != null ? (Object) path : (Object) url;            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_UNRELATED_RESOURCES, "The location for ''{0}'' for revision {1} does not exist in the " +                    "repository or refers to an unrelated object", new Object[] {source, new Long(endRevisionNumber)});            SVNErrorManager.error(err);        }                SVNRepositoryLocation[] result = new SVNRepositoryLocation[2];        SVNURL startURL = SVNURL.parseURIEncoded(SVNPathUtil.append(rootURL.toString(), SVNEncodingUtil.uriEncode(startPath.getPath())));        result[0] = new SVNRepositoryLocation(startURL, startRevisionNumber);        if (end.isValid()) {            SVNURL endURL = SVNURL.parseURIEncoded(SVNPathUtil.append(rootURL.toString(), SVNEncodingUtil.uriEncode(endPath.getPath())));            result[1] = new SVNRepositoryLocation(endURL, endRevisionNumber);        }        return result;    }