subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1589567 - in /subversion/branches/1.7.x: ./ subversion/libsvn_client/copy.c
Date Thu, 24 Apr 2014 04:00:49 GMT
Author: svn-role
Date: Thu Apr 24 04:00:49 2014
New Revision: 1589567

URL: http://svn.apache.org/r1589567
Log:
Merge the 1.7.x-r1551579 branch:

 * ^/subversion/branches/1.7.x-r1551579
   Fix moving files from externals to ancestor directories and vice versa.
   Justification:
     "Moves should just work" or "be nice to api users, like Markus"
   Votes:
     +1: rhuijben, breser, stefan2
     +1 (non-binding): schabi (Fixes our use case, all our other tests pass.)

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

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

Modified: subversion/branches/1.7.x/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/copy.c?rev=1589567&r1=1589566&r2=1589567&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/copy.c Thu Apr 24 04:00:49 2014
@@ -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_wc_root(&src_wcroot_abspath,
+                                 ctx->wc_ctx, src_parent_abspath,
+                                 iterpool, iterpool));
+      SVN_ERR(svn_wc__get_wc_root(&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;



Mime
View raw message