subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1727618 - /subversion/trunk/subversion/svn/conflict-callbacks.c
Date Fri, 29 Jan 2016 17:18:05 GMT
Author: stsp
Date: Fri Jan 29 17:18:05 2016
New Revision: 1727618

URL: http://svn.apache.org/viewvc?rev=1727618&view=rev
Log:
In the interactive conflict resolver, use the option id 'unspecified' to
indicate the user hasn't made a choice yet, rather than 'undefined' which
is otherwise used to mark 'svn' client-specific conflict options as such.

Also, ensure the variable containing the user's answer is always initialized
before prompting.

* subversion/svn/conflict-callbacks.c
  (handle_text_conflict, handle_prop_conflicts): Use the
   svn_client_conflict_option_unspecified option instead of
   svn_client_conflict_option_undefined to mark the state where
   the user hasn't made a choice yet.
  (handle_one_prop_conflict, handle_tree_conflict): Same, and make sure to
   initialize option_id.

Modified:
    subversion/trunk/subversion/svn/conflict-callbacks.c

Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1727618&r1=1727617&r2=1727618&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Fri Jan 29 17:18:05 2016
@@ -749,7 +749,7 @@ handle_text_conflict(svn_boolean_t *reso
   resolver_option_t *text_conflict_options;
   svn_client_conflict_option_id_t option_id; 
 
-  option_id = svn_client_conflict_option_undefined;
+  option_id = svn_client_conflict_option_unspecified;
 
   SVN_ERR(svn_client_conflict_text_get_contents(NULL, &my_abspath,
                                                 &base_abspath, &their_abspath,
@@ -1049,7 +1049,7 @@ handle_text_conflict(svn_boolean_t *reso
     }
   svn_pool_destroy(iterpool);
 
-  if (option_id != svn_client_conflict_option_undefined &&
+  if (option_id != svn_client_conflict_option_unspecified &&
       option_id != svn_client_conflict_option_postpone)
     {
       SVN_ERR(mark_conflict_resolved(conflict, option_id,
@@ -1149,6 +1149,8 @@ handle_one_prop_conflict(svn_client_conf
   const svn_string_t *their_propval;
   resolver_option_t *prop_conflict_options;
 
+  *option_id = svn_client_conflict_option_unspecified;
+
   SVN_ERR(svn_client_conflict_prop_get_propvals(NULL, &my_propval,
                                                 &base_propval, &their_propval,
                                                 conflict, propname,
@@ -1279,7 +1281,7 @@ handle_prop_conflicts(svn_boolean_t *res
                                        editor_cmd, config, conflict, propname,
                                        iterpool, iterpool));
 
-      if (option_id != svn_client_conflict_option_undefined &&
+      if (option_id != svn_client_conflict_option_unspecified &&
           option_id != svn_client_conflict_option_postpone)
         {
           SVN_ERR(mark_conflict_resolved(conflict, option_id,
@@ -1382,6 +1384,8 @@ handle_tree_conflict(svn_boolean_t *reso
   resolver_option_t *tree_conflict_options;
   svn_client_conflict_option_id_t option_id;
 
+  option_id = svn_client_conflict_option_unspecified;
+
   SVN_ERR(svn_client_conflict_tree_get_description(
            &description, conflict, scratch_pool, scratch_pool));
   SVN_ERR(svn_cmdline_fprintf(
@@ -1445,7 +1449,7 @@ handle_tree_conflict(svn_boolean_t *reso
         }
     }
   svn_pool_destroy(iterpool);
-  if (option_id != svn_client_conflict_option_undefined &&
+  if (option_id != svn_client_conflict_option_unspecified &&
       option_id != svn_client_conflict_option_postpone)
     {
       SVN_ERR(mark_conflict_resolved(conflict, option_id,



Mime
View raw message