String locationPath = SVNEncodingUtil.uriEncode(getLocation().getPath());
if (url == null) {
url = getActivityCollectionURL(locationPath, false);
}
IHTTPConnection httpConnection = getConnection();
String activityURL = SVNPathUtil.append(url, generateUUID());
HTTPStatus status = httpConnection.request("MKACTIVITY", activityURL, null, (StringBuffer) null, 201, 404, null, null);
if (status.getCode() == 404) {
url = getActivityCollectionURL(locationPath, true);
activityURL = SVNPathUtil.append(url, generateUUID());
status = httpConnection.request("MKACTIVITY", activityURL, null, (StringBuffer) null, 201, 0, null, null);
}
if (url != null && mediator != null) {
mediator.setWorkspaceProperty("", SVNProperty.ACTIVITY_URL, SVNPropertyValue.create(url));
}