Author: svn-role
Date: Fri Aug  1 18:58:54 2014
New Revision: 1615196

URL: http://svn.apache.org/r1615196
Log:
Merge the r1589460 group from trunk:

 * r1589460, r1589486
   Fix copying parents of locally deleted nodes between working copies.
   Justification:
     Resolves a case of creating invalid working copy state.
   Votes:
     +1: rhuijben, philip, breser

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.c
    subversion/branches/1.8.x/subversion/tests/cmdline/copy_tests.py

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1589460,1589486

Modified: subversion/branches/1.8.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1615196&r1=1615195&r2=1615196&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Fri Aug  1 18:58:54 2014
@@ -189,13 +189,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1589460, r1589486
-   Fix copying parents of locally deleted nodes between working copies.
-   Justification:
-     Resolves a case of creating invalid working copy state.
-   Votes:
-     +1: rhuijben, philip, breser
-
  * r1595431
    Use a proper intermediate directory when building with VS 2003-2008.
    Justification:

Modified: subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.c?rev=1615196&r1=1615195&r2=1615196&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_wc/wc_db.c Fri Aug  1 18:58:54 
2014
@@ -5138,6 +5138,17 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr
                                     scratch_pool));
     }
 
+  if (dst_presence == svn_wc__db_status_not_present)
+    {
+      /* Don't create descendants of a not present node! */
+
+      /* This code is currently still triggered by copying deleted nodes
+         between separate working copies. See ### comment above. */
+
+      svn_pool_destroy(iterpool);
+      return SVN_NO_ERROR;
+    }
+
   SVN_ERR(gather_repo_children(&children, src_wcroot, src_relpath,
                                src_op_depth, scratch_pool, iterpool));
 

Modified: subversion/branches/1.8.x/subversion/tests/cmdline/copy_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/tests/cmdline/copy_tests.py?rev=1615196&r1=1615195&r2=1615196&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/1.8.x/subversion/tests/cmdline/copy_tests.py Fri Aug  1 
18:58:54 2014
@@ -5844,6 +5844,39 @@ def ext_wc_copy_deleted(sbox):
                                         expected_output, None, None,
                                         wc2_dir)
 
+def copy_subtree_deleted(sbox):
+  "copy to-be-deleted subtree"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  wc2_dir = sbox.add_wc_path('2')
+  svntest.actions.duplicate_dir(wc_dir, wc2_dir)
+
+  sbox.simple_rm('A/B')
+
+  # Commit copy within a working copy
+  sbox.simple_copy('A', 'AA')
+  expected_output = expected_output = svntest.wc.State(wc_dir, {
+    'AA'    : Item(verb='Adding'),
+    'AA/B'  : Item(verb='Deleting'),
+  })
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output, None, None,
+                                        sbox.ospath('AA'))
+
+  # Commit copy between working copies
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'cp', sbox.path('A'),
+                                     os.path.join(wc2_dir,'AA2'))
+  expected_output = expected_output = svntest.wc.State(wc2_dir, {
+    'AA2'    : Item(verb='Adding'),
+    'AA2/B'  : Item(verb='Deleting'),
+  })
+  svntest.actions.run_and_verify_commit(wc2_dir,
+                                        expected_output, None, None,
+                                        wc2_dir)
+
+
 ########################################################################
 # Run the tests
 
@@ -5963,6 +5996,7 @@ test_list = [ None,
               copy_over_excluded,
               copy_relocate,
               ext_wc_copy_deleted,
+              copy_subtree_deleted,
              ]
 
 if __name__ == '__main__':


Reply via email to