subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1727721 - /subversion/trunk/subversion/libsvn_client/resolved.c
Date Sat, 30 Jan 2016 16:26:48 GMT
Author: stsp
Date: Sat Jan 30 16:26:48 2016
New Revision: 1727721

URL: http://svn.apache.org/viewvc?rev=1727721&view=rev
Log:
* subversion/libsvn_client/resolved.c
  (svn_client_conflict_tree_get_resolution_options): Always add an option
   which allows the user to accept the current working copy state. This option
   was not added if automated resolution is possible, but it needs to be
   always available so that '--accept working' can function.

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

Modified: subversion/trunk/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/resolved.c?rev=1727721&r1=1727720&r2=1727721&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/resolved.c (original)
+++ subversion/trunk/subversion/libsvn_client/resolved.c Sat Jan 30 16:26:48 2016
@@ -1049,7 +1049,11 @@ svn_client_conflict_tree_get_resolution_
   option = apr_pcalloc(result_pool, sizeof(*option));
   option->id = svn_client_conflict_option_merged_text;
   option->description = _("accept current working copy state");
-  /* Override ID and DESCRIPTION in case we can offer automated resolution: */
+  option->conflict = conflict;
+  option->do_resolve_func = resolve_tree_conflict;
+  APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) = option;
+
+  /* Add options which offer automated resolution: */
   if (svn_client_conflict_get_operation(conflict) == svn_wc_operation_update ||
       svn_client_conflict_get_operation(conflict) == svn_wc_operation_switch)
     {
@@ -1058,10 +1062,15 @@ svn_client_conflict_tree_get_resolution_
       reason = svn_client_conflict_get_local_change(conflict);
       if (reason == svn_wc_conflict_reason_moved_away)
         {
+          option = apr_pcalloc(result_pool, sizeof(*option));
           option->id =
             svn_client_conflict_option_update_move_destination;
           option->description =
             _("apply incoming changes to move destination");
+          option->conflict = conflict;
+          option->do_resolve_func = resolve_tree_conflict;
+          APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) =
+            option;
         }
       else if (reason == svn_wc_conflict_reason_deleted ||
                reason == svn_wc_conflict_reason_replaced)
@@ -1071,16 +1080,18 @@ svn_client_conflict_tree_get_resolution_
               svn_client_conflict_tree_get_victim_node_kind(conflict) ==
               svn_node_dir)
             {
+              option = apr_pcalloc(result_pool, sizeof(*option));
               option->id =
                 svn_client_conflict_option_update_any_moved_away_children;
               option->description =
                 _("prepare for updating moved-away children, if any");
+              option->conflict = conflict;
+              option->do_resolve_func = resolve_tree_conflict;
+              APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) =
+                option;
             }
         }
     }
-  option->conflict = conflict;
-  option->do_resolve_func = resolve_tree_conflict;
-  APR_ARRAY_PUSH((*options), const svn_client_conflict_option_t *) = option;
 
   return SVN_NO_ERROR;
 }



Mime
View raw message