subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1680245 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_client/externals.c libsvn_wc/externals.c
Date Tue, 19 May 2015 10:59:22 GMT
Author: rhuijben
Date: Tue May 19 10:59:21 2015
New Revision: 1680245

URL: http://svn.apache.org/r1680245
Log:
Make text conflicts in file externals during update properly invoke the
interactive conflict resolver. This patch reverts r1618864 (removing the
callback arguments) and starts using the conflict resolver callback.

libsvn_client uses this callback to record that the file is conflicted
and then invokes the resolver after the update.

* subversion/include/private/svn_wc_private.h
  (svn_wc__get_file_external_editor): Revert removing arguments.

* subversion/libsvn_client/externals.c
  (svn_wc__get_file_external_editor): Update caller.

* subversion/libsvn_wc/externals.c
  (edit_baton): Re-add callback.
  (close_file): Call conflict callback, if set, and if conflicted.
  (svn_wc__get_file_external_editor): Store callback in baton.

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_client/externals.c
    subversion/trunk/subversion/libsvn_wc/externals.c

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1680245&r1=1680244&r2=1680245&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Tue May 19 10:59:21 2015
@@ -82,6 +82,8 @@ svn_wc__get_file_external_editor(const s
                                  const char *recorded_url,
                                  const svn_opt_revision_t *recorded_peg_rev,
                                  const svn_opt_revision_t *recorded_rev,
+                                 svn_wc_conflict_resolver_func2_t conflict_func,
+                                 void *conflict_baton,
                                  svn_cancel_func_t cancel_func,
                                  void *cancel_baton,
                                  svn_wc_notify_func2_t notify_func,

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1680245&r1=1680244&r2=1680245&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Tue May 19 10:59:21 2015
@@ -538,6 +538,8 @@ switch_file_external(const char *local_a
                                              record_url,
                                              record_peg_revision,
                                              record_revision,
+                                             ctx->conflict_func2,
+                                             ctx->conflict_baton2,
                                              ctx->cancel_func,
                                              ctx->cancel_baton,
                                              ctx->notify_func2,

Modified: subversion/trunk/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/externals.c?rev=1680245&r1=1680244&r2=1680245&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/externals.c (original)
+++ subversion/trunk/subversion/libsvn_wc/externals.c Tue May 19 10:59:21 2015
@@ -475,6 +475,8 @@ struct edit_baton
   /* Introducing a new file external */
   svn_boolean_t added;
 
+  svn_wc_conflict_resolver_func2_t conflict_func;
+  void *conflict_baton;
   svn_cancel_func_t cancel_func;
   void *cancel_baton;
   svn_wc_notify_func2_t notify_func;
@@ -963,6 +965,18 @@ close_file(void *file_baton,
     /* Run the work queue to complete the installation */
     SVN_ERR(svn_wc__wq_run(eb->db, eb->wri_abspath,
                            eb->cancel_func, eb->cancel_baton, pool));
+
+    if (conflict_skel && eb->conflict_func)
+      SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db,
+                                               eb->local_abspath,
+                                               svn_node_file,
+                                               conflict_skel,
+                                               NULL /* merge_options */,
+                                               eb->conflict_func,
+                                               eb->conflict_baton,
+                                               eb->cancel_func,
+                                               eb->cancel_baton,
+                                               pool));
   }
 
   /* Notify */
@@ -1053,6 +1067,8 @@ svn_wc__get_file_external_editor(const s
                                  const char *recorded_url,
                                  const svn_opt_revision_t *recorded_peg_rev,
                                  const svn_opt_revision_t *recorded_rev,
+                                 svn_wc_conflict_resolver_func2_t conflict_func,
+                                 void *conflict_baton,
                                  svn_cancel_func_t cancel_func,
                                  void *cancel_baton,
                                  svn_wc_notify_func2_t notify_func,
@@ -1104,6 +1120,8 @@ svn_wc__get_file_external_editor(const s
   else
     eb->recorded_revision = SVN_INVALID_REVNUM; /* Not fixed/HEAD */
 
+  eb->conflict_func = conflict_func;
+  eb->conflict_baton = conflict_baton;
   eb->cancel_func = cancel_func;
   eb->cancel_baton = cancel_baton;
   eb->notify_func = notify_func;



Mime
View raw message