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 2013/01/18 18:51:42 UTC

svn commit: r1435273 - in /subversion/trunk/subversion: libsvn_wc/wc-queries.sql libsvn_wc/wc_db.c tests/libsvn_wc/op-depth-test.c

Author: philip
Date: Fri Jan 18 17:51:42 2013
New Revision: 1435273

URL: http://svn.apache.org/viewvc?rev=1435273&view=rev
Log:
Fix a nested move XFAIL.

* subversion/libsvn_wc/wc_db.c
  (delete_node): Tweak op-depth calculation. 

* subversion/libsvn_wc/wc-queries.sql
  (STMT_SELECT_MOVED_PAIR): Tweak comment.

* subversion/tests/libsvn_wc/op-depth-test.c
  (nested_move2): Remove comments.
  (test_funcs): Mark nested_move2 PASS.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    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-queries.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1435273&r1=1435272&r2=1435273&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Fri Jan 18 17:51:42 2013
@@ -1450,8 +1450,8 @@ WHERE wc_id = ?1 AND op_depth > 0
   AND IS_STRICT_DESCENDANT_OF(moved_to, ?2)
 
 /* This statement returns pairs of paths that define a move where the
-   destination of the move is within the subtree rooted at path ?2 in
-   WC_ID ?1. */
+   destination of the move is within the subtree rooted at path ?2 or
+   the source of the move is within the subtree rooted at path ?2 */
 -- STMT_SELECT_MOVED_PAIR
 SELECT local_relpath, moved_to, op_depth FROM nodes_current
 WHERE wc_id = ?1

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1435273&r1=1435272&r2=1435273&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jan 18 17:51:42 2013
@@ -6925,8 +6925,8 @@ delete_node(void *baton,
       APR_ARRAY_PUSH(moved_nodes, const struct moved_node_t *) = moved_node;
 
       /* If a subtree is being moved-away, we need to update moved-to
-       * information for all children that were moved into, or within,
-       * this subtree. */
+       * information for all children that were moved into, within or
+       * from this subtree. */
       if (kind == svn_kind_dir)
         {
           SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
@@ -6936,10 +6936,12 @@ delete_node(void *baton,
 
           while (have_row)
             {
+              /* Source of move */
               const char *move_relpath
                 = svn_sqlite__column_text(stmt, 0, NULL);
               const char *move_subtree_relpath
                 = svn_relpath_skip_ancestor(local_relpath, move_relpath);
+              /* Destination of move */
               const char *child_moved_to
                 = svn_sqlite__column_text(stmt, 1, NULL);
               const char *child_moved_to_subtree_relpath
@@ -6970,7 +6972,7 @@ delete_node(void *baton,
                                                moved_node->local_relpath))
                 moved_node->op_depth = b->delete_depth;
               else
-                moved_node->op_depth = child_op_depth;
+                moved_node->op_depth = relpath_depth(moved_node->local_relpath);
 
               APR_ARRAY_PUSH(moved_nodes, const struct moved_node_t *)
                 = moved_node;

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=1435273&r1=1435272&r2=1435273&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Fri Jan 18 17:51:42 2013
@@ -5728,13 +5728,13 @@ nested_moves2(const svn_test_opts_t *opt
       {1, "E/A/A",       "normal",       1, "A/A/A/A", MOVED_HERE},
       {1, "E/A/A/A",     "normal",       1, "A/A/A/A/A", MOVED_HERE},
       {1, "E/A/A/A/A",   "normal",       1, "A/A/A/A/A/A", MOVED_HERE},
-      {3, "E/A/A",       "base-deleted", NO_COPY_FROM, "D"},  /* XFAIL */
+      {3, "E/A/A",       "base-deleted", NO_COPY_FROM, "D"},
       {3, "E/A/A/A",     "base-deleted", NO_COPY_FROM},
       {3, "E/A/A/A/A",   "base-deleted", NO_COPY_FROM},
       {1, "D",           "normal",       1, "A/A/A/A", MOVED_HERE},
       {1, "D/A",         "normal",       1, "A/A/A/A/A", MOVED_HERE},
       {1, "D/A/A",       "normal",       1, "A/A/A/A/A/A", MOVED_HERE},
-      {3, "D/A/A",       "base-deleted", NO_COPY_FROM, "C"},  /* XFAIL */
+      {3, "D/A/A",       "base-deleted", NO_COPY_FROM, "C"},
       {1, "C",           "normal",       1, "A/A/A/A/A/A", MOVED_HERE},
       {0}
     };
@@ -5852,7 +5852,7 @@ struct svn_test_descriptor_t test_funcs[
                        "move_update_conflicts"),
     SVN_TEST_OPTS_PASS(move_update_delete_mods,
                        "move_update_delete_mods"),
-    SVN_TEST_OPTS_XFAIL(nested_moves2,
+    SVN_TEST_OPTS_PASS(nested_moves2,
                        "nested_moves2"),
     SVN_TEST_NULL
   };