You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/12/17 16:52:55 UTC

svn commit: r1551590 - in /subversion/branches/1.7.x-r1551579: ./ subversion/libsvn_client/copy.c

Author: rhuijben
Date: Tue Dec 17 15:52:55 2013
New Revision: 1551590

URL: http://svn.apache.org/r1551590
Log:
Merge r1551579 from trunk, removing testcase changes and fixing text conflict

Modified:
    subversion/branches/1.7.x-r1551579/   (props changed)
    subversion/branches/1.7.x-r1551579/subversion/libsvn_client/copy.c

Propchange: subversion/branches/1.7.x-r1551579/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1551579

Modified: subversion/branches/1.7.x-r1551579/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1551579/subversion/libsvn_client/copy.c?rev=1551590&r1=1551589&r2=1551590&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1551579/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/1.7.x-r1551579/subversion/libsvn_client/copy.c Tue Dec 17 15:52:55 2013
@@ -374,6 +374,8 @@ do_wc_to_wc_moves(const apr_array_header
     {
       const char *src_parent_abspath;
       struct do_wc_to_wc_moves_with_locks_baton baton;
+      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 *);
@@ -386,6 +388,13 @@ do_wc_to_wc_moves(const apr_array_header
       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
@@ -394,14 +403,18 @@ do_wc_to_wc_moves(const apr_array_header
            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)))
         {
           baton.lock_src = TRUE;
           baton.lock_dst = FALSE;
         }
-      else if (svn_dirent_is_child(pair->dst_parent_abspath, src_parent_abspath,
-                                   iterpool))
+      else if (svn_dirent_is_child(pair->dst_parent_abspath,
+                                   src_parent_abspath, NULL)
+               && !svn_dirent_is_child(pair->dst_parent_abspath,
+                                       src_wcroot_abspath, NULL))
         {
           baton.lock_src = FALSE;
           baton.lock_dst = TRUE;