You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/09/18 15:16:56 UTC

svn commit: r1703837 - /subversion/trunk/subversion/svn/conflict-callbacks.c

Author: stsp
Date: Fri Sep 18 13:16:56 2015
New Revision: 1703837

URL: http://svn.apache.org/viewvc?rev=1703837&view=rev
Log:
Start removing svn_cl__interactive_conflict_baton_t from 'svn' conflict code.

Instead of passing the baton around, pass individual parameters based on
data in the baton.

* subversion/svn/conflict-callbacks.c
  (open_editor): Accept 'editor_cmd' and 'config' parameters instead
   of svn_cl__interactive_conflict_baton_t.
  (edit_prop_conflict, handle_text_conflict): Update callers. 

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=1703837&r1=1703836&r2=1703837&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Fri Sep 18 13:16:56 2015
@@ -334,15 +334,16 @@ show_prop_conflict(const svn_string_t *b
 static svn_error_t *
 open_editor(svn_boolean_t *performed_edit,
             const char *merged_abspath,
-            svn_cl__interactive_conflict_baton_t *b,
+            const char *editor_cmd,
+            apr_hash_t *config,
             apr_pool_t *pool)
 {
   svn_error_t *err;
 
   if (merged_abspath)
     {
-      err = svn_cmdline__edit_file_externally(merged_abspath, b->editor_cmd,
-                                              b->config, pool);
+      err = svn_cmdline__edit_file_externally(merged_abspath, editor_cmd,
+                                              config, pool);
       if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR ||
                   err->apr_err == SVN_ERR_EXTERNAL_PROGRAM))
         {
@@ -397,7 +398,8 @@ edit_prop_conflict(const svn_string_t **
                               scratch_pool));
   SVN_ERR(svn_stream_close(merged_prop));
   SVN_ERR(svn_io_file_flush(file, scratch_pool));
-  SVN_ERR(open_editor(&performed_edit, file_path, b, scratch_pool));
+  SVN_ERR(open_editor(&performed_edit, file_path, b->editor_cmd,
+                      b->config, scratch_pool));
   if (performed_edit && merged_propval)
     {
       svn_stringbuf_t *buf;
@@ -868,7 +870,8 @@ handle_text_conflict(svn_client_conflict
         }
       else if (strcmp(opt->code, "e") == 0 || strcmp(opt->code, ":-E") == 0)
         {
-          SVN_ERR(open_editor(&performed_edit, merged_abspath, b, iterpool));
+          SVN_ERR(open_editor(&performed_edit, merged_abspath, b->editor_cmd,
+                              b->config, iterpool));
           if (performed_edit)
             knows_something = TRUE;
         }