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, SVNLogType.WC);
}
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, SVNLogType.WC);
}
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;
}