You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2011/04/05 17:55:01 UTC

svn commit: r1089096 - in /subversion/trunk/subversion: libsvn_wc/wc_db.c tests/libsvn_wc/op-depth-test.c

Author: philip
Date: Tue Apr  5 15:55:01 2011
New Revision: 1089096

URL: http://svn.apache.org/viewvc?rev=1089096&view=rev
Log:
Fix a bug revealed, but not really introduced, by the recent mixed-rev
change, status is not the same as presence!

* subversion/libsvn_wc/wc_db.c
  (temp_op_delete_txn): Check for deleted as well as not-present when
   deciding whether to delete or modify a working layer.

* subversion/tests/libsvn_wc/op-depth-test.c
  (test_mixed_rev_copy): Delete a mixed-rev child.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1089096&r1=1089095&r2=1089096&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Tue Apr  5 15:55:01 2011
@@ -4666,7 +4666,8 @@ temp_op_delete_txn(void *baton,
                                      wcroot, local_relpath, scratch_pool));
 
           if ((below_base || below_work)
-              && below_status != svn_wc__db_status_not_present)
+              && below_status != svn_wc__db_status_not_present
+              && below_status != svn_wc__db_status_deleted)
             mod_work = TRUE;
           else
             del_work = TRUE;

Modified: subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c?rev=1089096&r1=1089095&r2=1089096&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Tue Apr  5 15:55:01 2011
@@ -1718,6 +1718,21 @@ test_mixed_rev_copy(const svn_test_opts_
     SVN_ERR(check_db_rows(&b, "X", rows));
   }
 
+  SVN_ERR(wc_delete(&b, "X/B/C"));
+  {
+    nodes_row_t rows[] = {
+      { 1, "X",     "normal",       1, "A" },
+      { 1, "X/B",   "not-present",  2, "A/B" },
+      { 2, "X/B",   "normal",       2, "A/B" },
+      { 2, "X/B/C", "not-present",  3, "A/B/C" },
+      { 2, "X/Y",   "normal",       2, "A/B" },
+      { 2, "X/Y/C", "not-present",  3, "A/B/C" },
+      { 3, "X/Y/C", "normal",       3, "A/B/C" },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "X", rows));
+  }
+
   return SVN_NO_ERROR;
 }