DAVLocationsHandler davHandler = new DAVLocationsHandler(handler);
String root = getLocation().getPath();
root = SVNEncodingUtil.uriEncode(root);
DAVBaselineInfo info = DAVUtil.getBaselineInfo(connection, this, root, pegRevision, false, false, null);
path = SVNPathUtil.append(info.baselineBase, info.baselinePath);
HTTPStatus status = connection.doReport(path, request, davHandler);
if (status.getCode() == 501) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_IMPLEMENTED,
"'get-locations' REPORT not implemented");
SVNErrorManager.error(err, status.getError(), SVNLogType.NETWORK);
} else if (status.getError() != null) {
SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
}
return davHandler.getEntriesCount();
} finally {
closeConnection();
}