}
}
public long getDatedRevision(Date date) throws SVNException {
date = date == null ? new Date(System.currentTimeMillis()) : date;
DAVDateRevisionHandler handler = new DAVDateRevisionHandler();
StringBuffer request = DAVDateRevisionHandler.generateDateRevisionRequest(null, date);
try {
openConnection();
String path = getLocation().getURIEncodedPath();
DAVConnection connection = getConnection();
path = DAVUtil.getVCCPath(connection, this, path);
HTTPStatus status = connection.doReport(path, request, handler);
if (status.getError() != null) {
if (status.getError().getErrorCode() == SVNErrorCode.UNSUPPORTED_FEATURE) {
SVNErrorMessage err2 = SVNErrorMessage.create(status.getError().getErrorCode(),
"Server does not support date-based operations");
SVNErrorManager.error(err2, status.getError(), SVNLogType.NETWORK);
}
SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
}
} finally {
closeConnection();
}
return handler.getRevisionNumber();
}