subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1751914 - /subversion/trunk/subversion/libsvn_client/conflicts.c
Date Fri, 08 Jul 2016 14:24:00 GMT
Author: stsp
Date: Fri Jul  8 14:24:00 2016
New Revision: 1751914

URL: http://svn.apache.org/viewvc?rev=1751914&view=rev
Log:
Do not offer the 'ignore incoming deletion' option for real 'delete vs delete'
tree conflicts. Offering such an option makes no sense in that case.

Since we now scan the log for incoming moves we can tell apart an incoming
deletion from an incoming move fairly reliably.

Arguably, an actual 'delete vs delete' conflict should be auto-resolved to
'accept incoming deletion', but that's left for later. The question of how
whether and how to provide default answers for conflict resolver questions
should be settled first.

* subversion/libsvn_client/conflicts.c
  (configure_option_incoming_delete_ignore): Don't add this option in a real
   'delete vs delete' conflict situation.

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=1751914&r1=1751913&r2=1751914&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Fri Jul  8 14:24:00 2016
@@ -7170,6 +7170,34 @@ configure_option_incoming_delete_ignore(
   if (incoming_change == svn_wc_conflict_action_delete)
     {
       svn_client_conflict_option_t *option;
+      struct conflict_tree_incoming_delete_details *incoming_details;
+      svn_boolean_t is_incoming_move;
+
+      /* If the local item was deleted and conflict details were fetched and
+       * indicate that there was no move, then this is an actual 'delete vs
+       * delete' situation. An option which ignores the incoming deletion makes
+       * no sense in that case because there is no local node to preserve. */
+      incoming_details = conflict->tree_conflict_incoming_details;
+      is_incoming_move = (incoming_details != NULL &&
+                          incoming_details->moves != NULL);
+      if (local_change == svn_wc_conflict_reason_deleted)
+        {
+          if (!is_incoming_move)
+            return SVN_NO_ERROR;
+        }
+      else if (local_change == svn_wc_conflict_reason_missing &&
+               operation == svn_wc_operation_merge)
+        {
+          struct conflict_tree_local_missing_details *local_details;
+          svn_boolean_t is_local_move; /* "local" to branch history */
+
+          local_details = conflict->tree_conflict_local_details;
+          is_local_move = (local_details != NULL &&
+                           local_details->moves != NULL);
+
+          if (!is_incoming_move && !is_local_move)
+            return SVN_NO_ERROR;
+        }
 
       option = apr_pcalloc(options->pool, sizeof(*option));
       option->pool = options->pool;



Mime
View raw message