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 17:15:44 UTC

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

Author: philip
Date: Thu Jan 10 16:15:44 2013
New Revision: 1431465

URL: http://svn.apache.org/viewvc?rev=1431465&view=rev
Log:
Preserve nested moves during update.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_COPY_NODE_MOVE): Preserve moved-to.

* subversion/libsvn_wc/wc_db_update_move.c
  (replace_moved_layer): Tweak comment.

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

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    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-queries.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1431465&r1=1431464&r2=1431465&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Thu Jan 10 16:15:44 2013
@@ -238,13 +238,17 @@ INSERT OR REPLACE INTO nodes (
     wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,
     revision, presence, depth, kind, changed_revision, changed_date,
     changed_author, checksum, properties, translated_size, last_mod_time,
-    symlink_target, moved_here )
+    symlink_target, moved_here, moved_to )
 SELECT
     wc_id, ?4 /*local_relpath */, ?5 /*op_depth*/, ?6 /* parent_relpath */,
     repos_id,
     repos_path, revision, presence, depth, kind, changed_revision,
     changed_date, changed_author, checksum, properties, translated_size,
-    last_mod_time, symlink_target, 1
+    last_mod_time, symlink_target, 1,
+    (SELECT dst.moved_to FROM nodes AS dst
+                         WHERE dst.wc_id = ?1
+                         AND dst.local_relpath = ?4
+                         AND dst.op_depth = ?5)
 FROM nodes
 WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
 

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=1431465&r1=1431464&r2=1431465&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 16:15:44 2013
@@ -1131,9 +1131,7 @@ 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.
-
-     ### FIXME: the delete/replace is destroying nested moves. */
+  /* Replace entire subtree at one op-depth. */
   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=1431465&r1=1431464&r2=1431465&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 16:15:44 2013
@@ -5596,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_XFAIL(nested_move_update2,
+    SVN_TEST_OPTS_PASS(nested_move_update2,
                        "nested_move_update2"),
     SVN_TEST_NULL
   };