Author: stsp
Date: Fri Mar  2 11:34:18 2018
New Revision: 1825709

URL: http://svn.apache.org/viewvc?rev=1825709&view=rev
Log:
Do not offer conflict resolution options for move vs. move conflicts.

The resolver does not yet support 'move vs. move' conflict resolution options.

However, it erroneously offered the 'accept incoming deletion' and 'ignore
incoming deletion' options in such situations, which doesn't make sense and
could mislead users. It is better to not offer any options in 'move vs move'
cases until the resolver is able to resolve them.

* subversion/libsvn_client/conflicts.c
  (configure_option_incoming_delete_ignore,
   configure_option_incoming_delete_accept): Don't register these options
    in move-vs-move conflict situations.

Modified:
    subversion/trunk/subversion/libsvn_client/conflicts.c

Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1825709&r1=1825708&r2=1825709&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Fri Mar  2 11:34:18 
2018
@@ -9674,11 +9674,13 @@ configure_option_incoming_delete_ignore(
       incoming_details = conflict->tree_conflict_incoming_details;
       is_incoming_move = (incoming_details != NULL &&
                           incoming_details->moves != NULL);
-      if (local_change == svn_wc_conflict_reason_edited && is_incoming_move)
+      if (local_change == svn_wc_conflict_reason_moved_away ||
+          local_change == svn_wc_conflict_reason_edited)
         {
           /* An option which ignores the incoming deletion makes no sense
-           * if we know it is actually a move. */
-          return SVN_NO_ERROR;
+           * if we know there was a local move and/or an incoming move. */
+          if (is_incoming_move)
+            return SVN_NO_ERROR;
         }
       else if (local_change == svn_wc_conflict_reason_deleted)
         {
@@ -9739,14 +9741,17 @@ configure_option_incoming_delete_accept(
   if (incoming_change == svn_wc_conflict_action_delete)
     {
       struct conflict_tree_incoming_delete_details *incoming_details;
+      svn_boolean_t is_incoming_move;
 
       incoming_details = conflict->tree_conflict_incoming_details;
-
-      if (local_change == svn_wc_conflict_reason_edited &&
-          incoming_details != NULL && incoming_details->moves != NULL)
+      is_incoming_move = (incoming_details != NULL &&
+                          incoming_details->moves != NULL);
+      if (is_incoming_move &&
+          (local_change == svn_wc_conflict_reason_edited ||
+          local_change == svn_wc_conflict_reason_moved_away))
         {
           /* An option which accepts the incoming deletion makes no sense
-           * if we know it is actually a move. */
+           * if we know there was a local move and/or an incoming move. */
           return SVN_NO_ERROR;
         }
       else


Reply via email to