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/10 14:46:08 UTC

svn commit: r1431354 - in /subversion/trunk/subversion: libsvn_wc/wc_db_update_move.c tests/libsvn_wc/op-depth-test.c

Author: philip
Date: Thu Jan 10 13:46:08 2013
New Revision: 1431354

URL: http://svn.apache.org/viewvc?rev=1431354&view=rev
Log:
The update code for moves isn't preserving nested moves properly.

* subversion/tests/libsvn_wc/op-depth-test.c
  (nested_move_update2): Extend.
  (test_funcs): Mark nested_move_update2 XFAIL.

* subversion/libsvn_wc/wc_db_update_move.c
  (replace_moved_layer): Change comment to note problem.

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

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c?rev=1431354&r1=1431353&r2=1431354&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Thu Jan 10 13:46:08 2013
@@ -1131,7 +1131,9 @@ replace_moved_layer(const char *src_relp
   svn_boolean_t have_row;
   int dst_op_depth = relpath_depth(dst_relpath);
 
-  /* Replace entire subtree at one op-depth. */
+  /* Replace entire subtree at one op-depth.
+
+     ### FIXME: the delete/replace is destroying nested moves. */
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_SELECT_LOCAL_RELPATH_OP_DEPTH));
   SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id,

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=1431354&r1=1431353&r2=1431354&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Thu Jan 10 13:46:08 2013
@@ -5439,7 +5439,9 @@ nested_move_update2(const svn_test_opts_
   SVN_ERR(sbox_wc_update(&b, "", 1));
   SVN_ERR(sbox_wc_move(&b, "A", "A2"));
   SVN_ERR(sbox_wc_move(&b, "P", "A"));
+  SVN_ERR(sbox_wc_move(&b, "A2", "P"));
   SVN_ERR(sbox_wc_move(&b, "A/Q", "A/Q2"));
+  SVN_ERR(sbox_wc_move(&b, "P/B", "P/B2"));
 
   {
     nodes_row_t nodes[] = {
@@ -5448,15 +5450,16 @@ nested_move_update2(const svn_test_opts_
       {0, "A/B",       "normal",       1, "A/B"},
       {0, "P",         "normal",       1, "P"},
       {0, "P/Q",       "normal",       1, "P/Q"},
-      {1, "A2",        "normal",       1, "A", MOVED_HERE},
-      {1, "A2/B",      "normal",       1, "A/B", MOVED_HERE},
-      {1, "A",         "normal",       1, "P", FALSE, "A2", TRUE},
+      {1, "A",         "normal",       1, "P", FALSE, "P", TRUE},
       {1, "A/B",       "base-deleted", NO_COPY_FROM},
       {1, "A/Q",       "normal",       1, "P/Q", MOVED_HERE},
-      {1, "P",         "base-deleted", NO_COPY_FROM, "A"},
+      {1, "P",         "normal",       1, "A", FALSE, "A", TRUE},
       {1, "P/Q",       "base-deleted", NO_COPY_FROM},
+      {1, "P/B",       "normal",       1, "A/B", MOVED_HERE},
       {2, "A/Q",       "base-deleted", NO_COPY_FROM, "A/Q2"},
       {2, "A/Q2",      "normal",       1, "P/Q", MOVED_HERE},
+      {2, "P/B",       "base-deleted", NO_COPY_FROM, "P/B2"},
+      {2, "P/B2",      "normal",       1, "A/B", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -5472,15 +5475,16 @@ nested_move_update2(const svn_test_opts_
       {0, "A/B",       "normal",       2, "A/B"},
       {0, "P",         "normal",       1, "P"},
       {0, "P/Q",       "normal",       1, "P/Q"},
-      {1, "A2",        "normal",       2, "A", MOVED_HERE},
-      {1, "A2/B",      "normal",       2, "A/B", MOVED_HERE},
-      {1, "A",         "normal",       1, "P", FALSE, "A2", TRUE},
+      {1, "A",         "normal",       1, "P", FALSE, "P", TRUE},
       {1, "A/B",       "base-deleted", NO_COPY_FROM},
       {1, "A/Q",       "normal",       1, "P/Q", MOVED_HERE},
-      {1, "P",         "base-deleted", NO_COPY_FROM, "A"},
+      {1, "P",         "normal",       2, "A", FALSE, "A", TRUE},
       {1, "P/Q",       "base-deleted", NO_COPY_FROM},
+      {1, "P/B",       "normal",       2, "A/B", MOVED_HERE},
       {2, "A/Q",       "base-deleted", NO_COPY_FROM, "A/Q2"},
       {2, "A/Q2",      "normal",       1, "P/Q", MOVED_HERE},
+      {2, "P/B",       "base-deleted", NO_COPY_FROM, "P/B2"},
+      {2, "P/B2",      "normal",       2, "A/B", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -5592,7 +5596,7 @@ struct svn_test_descriptor_t test_funcs[
                        "nested_move_update"),
     SVN_TEST_OPTS_XFAIL(nested_move_commit,
                        "nested_move_commit"),
-    SVN_TEST_OPTS_PASS(nested_move_update2,
+    SVN_TEST_OPTS_XFAIL(nested_move_update2,
                        "nested_move_update2"),
     SVN_TEST_NULL
   };