diff options
author | Peter Wemm <peter@FreeBSD.org> | 2014-02-20 19:26:10 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2014-02-20 19:26:10 +0000 |
commit | 219f5ebf8fca3572d8d4265d78d0e4670ca35a27 (patch) | |
tree | e6232088e2faabbf0f1a6e568df3285323f27c5c /subversion/libsvn_client/copy.c | |
parent | eeb88685bfa4ef1c0639f1136d83ff19de1b4595 (diff) |
Notes
Diffstat (limited to 'subversion/libsvn_client/copy.c')
-rw-r--r-- | subversion/libsvn_client/copy.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/subversion/libsvn_client/copy.c b/subversion/libsvn_client/copy.c index 000ae0c2ff1c..f204bbcf2c4e 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; |