You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/11/06 20:42:40 UTC

svn commit: r1406283 - /subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c

Author: stsp
Date: Tue Nov  6 19:42:39 2012
New Revision: 1406283

URL: http://svn.apache.org/viewvc?rev=1406283&view=rev
Log:
In the move-update editor, read info for nodes within the move destination
from the op-depth layer that is part of the move, rather than reading it
from the highest layer.

This makes us read the correct row for nodes which were replaced post-move.
However, currently we crash somewhere in svn_wc__internal_merge() if a file
was replaced post-move, which will need to be fixed next (perhaps by
flagging a tree-conflict instead of updating the file? We'll see...)

* subversion/libsvn_wc/wc_db_update_move.c
  (tc_editor_alter_file): Use svn_wc__db_depth_get_info() instead of
   svn_wc__db_read_info_internal() to read info for nodes at the layer
   which is part of the move.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db_update_move.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=1406283&r1=1406282&r2=1406283&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Tue Nov  6 19:42:39 2012
@@ -138,23 +138,14 @@ tc_editor_alter_file(void *baton,
   svn_kind_t kind;
 
   /* Get kind, revision, and checksum of the moved-here node. */
-  /* 
-   * ### Currently doesn't work right if the moved-away node has been replaced.
-   * ### Need to read info from the move op-root's op-depth, not WORKING, to
-   * ### properly update shadowed nodes within multi-layer move destinations.
-   */
-  SVN_ERR(svn_wc__db_read_info_internal(NULL, &kind, NULL, NULL, NULL, NULL,
-                                        NULL, NULL, NULL, &moved_here_checksum,
-                                        NULL, &original_repos_relpath, NULL,
-                                        &original_revision, NULL, NULL, NULL,
-                                        NULL, NULL, NULL, NULL, NULL, NULL,
-                                        NULL, NULL, b->wcroot, dst_relpath,
-                                        scratch_pool, scratch_pool));
+  SVN_ERR(svn_wc__db_depth_get_info(NULL, &kind, &original_revision,
+                                    &original_repos_relpath, NULL, NULL, NULL,
+                                    NULL, NULL, &moved_here_checksum, NULL,
+                                    NULL, b->wcroot, dst_relpath,
+                                    relpath_depth(b->dst_relpath),
+                                    scratch_pool, scratch_pool));
   SVN_ERR_ASSERT(original_revision == expected_moved_here_revision);
-
-  /* ### check original revision against moved-here op-root revision? */
-  if (kind != svn_kind_file)
-    return SVN_NO_ERROR;
+  SVN_ERR_ASSERT(kind == svn_kind_file);
 
   /* ### what if checksum kind differs?*/
   if (!svn_checksum_match(moved_away_checksum, moved_here_checksum))