Author: stsp
Date: Thu Nov 24 17:16:46 2011
New Revision: 1205936

URL: http://svn.apache.org/viewvc?rev=1205936&view=rev
Log:
On the moves-scan-log branch, correctly label the local state of tree
conflicts involving a locally moved-away node.

* subversion/libsvn_wc/update_editor.c
  (check_tree_conflict): Re-add the moved_to_abspath paramater which
   was dropped earlier on this branch. However, only use it to check
   whether the local node was deleted or whether it was moved away,
   and label the local state in the tree conflict description accordingly.
  (delete_entry, add_directory, open_directory, add_file,
   open_file): Update callers.

Modified:
    subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c

Modified: 
subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c?rev=1205936&r1=1205935&r2=1205936&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c 
(original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c Thu 
Nov 24 17:16:46 2011
@@ -1511,6 +1511,7 @@ check_tree_conflict(svn_wc_conflict_desc
                     svn_wc_conflict_action_t action,
                     svn_node_kind_t their_node_kind,
                     const char *their_relpath,
+                    const char *moved_to_abspath,
                     apr_pool_t *result_pool,
                     apr_pool_t *scratch_pool)
 {
@@ -1578,10 +1579,11 @@ check_tree_conflict(svn_wc_conflict_desc
 
 
       case svn_wc__db_status_deleted:
-        /* Flag a delete vs. delete conflict for now.
+        /* Flag a incoming delete vs. local delete/moved-away conflict for now.
          * This might get auto-resolved once we've learned whether or
          * not this incoming delete is really part of an incoming move. */
-        reason = svn_wc_conflict_reason_deleted;
+        reason = moved_to_abspath ? svn_wc_conflict_reason_moved_away
+                                  : svn_wc_conflict_reason_deleted;
         break;
 
       case svn_wc__db_status_incomplete:
@@ -2120,7 +2122,8 @@ delete_entry(const char *path,
       SVN_ERR(check_tree_conflict(&tree_conflict, eb, local_abspath,
                                   status, kind, TRUE,
                                   svn_wc_conflict_action_delete, svn_node_none,
-                                  repos_relpath, pb->pool, scratch_pool));
+                                  repos_relpath, moved_to_abspath,
+                                  pb->pool, scratch_pool));
     }
 
   /* If this is an incoming delete vs. local delete/move conflict
@@ -2569,7 +2572,7 @@ add_directory(const char *path,
                                       status, wc_kind, FALSE,
                                       svn_wc_conflict_action_add,
                                       svn_node_dir, db->new_relpath,
-                                      pool, pool));
+                                      NULL, pool, pool));
         }
 
       if (tree_conflict == NULL)
@@ -2794,7 +2797,8 @@ open_directory(const char *path,
     SVN_ERR(check_tree_conflict(&tree_conflict, eb, db->local_abspath,
                                 status, wc_kind, TRUE,
                                 svn_wc_conflict_action_edit, svn_node_dir,
-                                db->new_relpath, db->pool, pool));
+                                db->new_relpath, db->moved_to_abspath,
+                                db->pool, pool));
 
   /* Remember the roots of any locally deleted trees. */
   if (tree_conflict != NULL)
@@ -3664,7 +3668,7 @@ add_file(const char *path,
                                       fb->local_abspath,
                                       status, wc_kind, FALSE,
                                       svn_wc_conflict_action_add,
-                                      svn_node_file, fb->new_relpath,
+                                      svn_node_file, fb->new_relpath, NULL,
                                       scratch_pool, scratch_pool));
         }
 
@@ -3839,7 +3843,8 @@ open_file(const char *path,
     SVN_ERR(check_tree_conflict(&tree_conflict, eb, fb->local_abspath,
                                 status, wc_kind, TRUE,
                                 svn_wc_conflict_action_edit, svn_node_file,
-                                fb->new_relpath, fb->pool, scratch_pool));
+                                fb->new_relpath, fb->moved_to_abspath,
+                                fb->pool, scratch_pool));
 
   /* Is this path the victim of a newly-discovered tree conflict? */
   if (tree_conflict != NULL)


Reply via email to