boolean serverSupportsDepth = hasCapability(SVNCapability.DEPTH);
if (depth != SVNDepth.FILES && depth != SVNDepth.INFINITY && !serverSupportsDepth) {
editor = SVNDepthFilterEditor.getDepthFilterEditor(depth, editor, target != null);
}
DAVEditorHandler handler = null;
try {
openConnection();
DAVConnection connection = getConnection();
Map lockTokens = new SVNHashMap();
StringBuffer request = DAVEditorHandler.generateEditorRequest(connection, null,
url.toString(), targetRevision, target, dstPath, depth, lockTokens, ignoreAncestry,
resourceWalk, fetchContents, sendCopyFromArgs, sendAll, reporter);
handler = new DAVEditorHandler(myConnectionFactory, this, editor, lockTokens, fetchContents,
target != null && !"".equals(target));
String bcPath = SVNEncodingUtil.uriEncode(getLocation().getPath());
try {
bcPath = DAVUtil.getVCCPath(connection, this, bcPath);
} catch (SVNException e) {
if (closeEditorOnException) {
editor.closeEdit();
}
throw e;
}
HTTPStatus status = connection.doReport(bcPath, request, handler, spool);
if (status.getError() != null) {
SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
}
} finally {
if (handler != null) {
handler.closeConnection();
}
closeConnection();
}
}