summaryrefslogtreecommitdiff
path: root/subversion/libsvn_client/copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_client/copy.c')
-rw-r--r--subversion/libsvn_client/copy.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/subversion/libsvn_client/copy.c b/subversion/libsvn_client/copy.c
index 000ae0c2ff1c5..f204bbcf2c4ee 100644
--- a/subversion/libsvn_client/copy.c
+++ b/subversion/libsvn_client/copy.c
@@ -314,6 +314,8 @@ do_wc_to_wc_moves(svn_boolean_t *timestamp_sleep,
{
const char *src_parent_abspath;
svn_boolean_t lock_src, lock_dst;
+ const char *src_wcroot_abspath;
+ const char *dst_wcroot_abspath;
svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i,
svn_client__copy_pair_t *);
@@ -326,6 +328,13 @@ do_wc_to_wc_moves(svn_boolean_t *timestamp_sleep,
src_parent_abspath = svn_dirent_dirname(pair->src_abspath_or_url,
iterpool);
+ SVN_ERR(svn_wc__get_wcroot(&src_wcroot_abspath,
+ ctx->wc_ctx, src_parent_abspath,
+ iterpool, iterpool));
+ SVN_ERR(svn_wc__get_wcroot(&dst_wcroot_abspath,
+ ctx->wc_ctx, pair->dst_parent_abspath,
+ iterpool, iterpool));
+
/* We now need to lock the right combination of batons.
Four cases:
1) src_parent == dst_parent
@@ -334,15 +343,18 @@ do_wc_to_wc_moves(svn_boolean_t *timestamp_sleep,
4) src_parent and dst_parent are disjoint
We can handle 1) as either 2) or 3) */
if (strcmp(src_parent_abspath, pair->dst_parent_abspath) == 0
- || svn_dirent_is_child(src_parent_abspath, pair->dst_parent_abspath,
- iterpool))
+ || (svn_dirent_is_child(src_parent_abspath, pair->dst_parent_abspath,
+ NULL)
+ && !svn_dirent_is_child(src_parent_abspath, dst_wcroot_abspath,
+ NULL)))
{
lock_src = TRUE;
lock_dst = FALSE;
}
else if (svn_dirent_is_child(pair->dst_parent_abspath,
- src_parent_abspath,
- iterpool))
+ src_parent_abspath, NULL)
+ && !svn_dirent_is_child(pair->dst_parent_abspath,
+ src_wcroot_abspath, NULL))
{
lock_src = FALSE;
lock_dst = TRUE;