[[[
Correctly handle existing parent directories when performing repos-to-wc copy.
* subversion/libsvn_client/copy.c
(repos_to_wc_copy): If add_parents flag is set and destination parent
directory exists, but is unversioned, put it under version control. Wc-to-wc
copy behaves this way, and so should repos-to-wc copy do.
]]]
--
Nikita Slyusarev
Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c (revision 1835673)
+++ subversion/libsvn_client/copy.c (working copy)
@@ -2742,6 +2742,16 @@ repos_to_wc_copy(svn_boolean_t *timestamp_sleep,
SVN_ERR(svn_client__make_local_parents(dst_parent, TRUE, ctx,
iterpool));
}
+ else if (make_parents && dst_parent_kind == svn_node_dir)
+ {
+ SVN_ERR(svn_wc_read_kind2(&dst_parent_kind, ctx->wc_ctx, dst_parent,
+ FALSE, TRUE, iterpool));
+ if (dst_parent_kind == svn_node_none)
+ {
+ SVN_ERR(svn_client__make_local_parents(dst_parent, TRUE, ctx,
+ iterpool));
+ }
+ }
else if (dst_parent_kind != svn_node_dir)
{
return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,