subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1097931 - in /subversion/trunk/subversion: include/ libsvn_client/ libsvn_wc/
Date Fri, 29 Apr 2011 19:48:49 GMT
Author: rhuijben
Date: Fri Apr 29 19:48:48 2011
New Revision: 1097931

URL: http://svn.apache.org/viewvc?rev=1097931&view=rev
Log:
Make libsvn_wc finally use svn_wc_conflict_func2_t for conflict resolving for
its non deprecated functions, providing wrappers where necessary.

* subversion/include/svn_client.h
  (svn_client_ctx_t): Add new style callback.

* subversion/include/svn_wc.h
  (svn_wc_get_update_editor4): Update prototype.
  (svn_wc_get_update_editor3): Update documentation.
  (svn_wc_get_switch_editor4): Update prototype.
  (svn_wc_get_switch_editor3): Update documentation.
  (svn_wc_merge4): Update prototype.
  (svn_wc_merge3): Update documentation.
  (svn_wc_merge_props3): Update prototype.
  (svn_wc_merge_props2): Update documentation.

* subversion/libsvn_client/ctx.c
  (includes): Include private/svn_wc_private.h.
  (call_conflict_func): New function.
  (svn_client_create_context): Add wrapping conflict resolver.

* subversion/libsvn_client/merge.c
  (merge_props_changed): Pass new resolver.
  (conflict_resolver_baton_t): Store new style function.
  (conflict_resolver): Implement svn_wc_conflict_resolver_func2_t.
  (merge_file_changed): Update caller.

* subversion/libsvn_client/switch.c
  (switch_internal): Update caller.

* subversion/libsvn_client/update.c
  (update_internal): Update caller.

* subversion/libsvn_wc/deprecated.c
  (conflict_func_1to2_baton): New struct.
  (conflict_func_1to2_wrapper): New baton.
  (svn_wc_merge_props2,
   svn_wc_get_update_editor3,
   svn_wc_get_switch_editor3,
   svn_wc_merge3): Wrap old style conflict resolver.

* subversion/libsvn_wc/merge.c
  (setup_text_conflict_desc): Remove conversion.
  (maybe_resolve_conflicts,
   merge_text_file,
   merge_binary_file,
   svn_wc__internal_merge,
   svn_wc_merge4): Use new resolver.

* subversion/libsvn_wc/props.c
  (svn_wc__perform_props_merge,
   svn_wc_merge_props3,
   maybe_generate_propconflict,
   apply_single_prop_add,
   apply_single_prop_delete,
   apply_single_mergeinfo_prop_change,
   apply_single_generic_prop_change,
   apply_single_prop_change,
   svn_wc__merge_props): Use new resolver.

* subversion/libsvn_wc/props.h
  (svn_wc__merge_props,
   svn_wc__perform_props_merge): Update prototype.

* subversion/libsvn_wc/update_editor.c
  (edit_baton): Store new type resolver.
  (make_editor,
   svn_wc_get_update_editor4,
   svn_wc_get_switch_editor4): Use new resolver type.

* subversion/libsvn_wc/wc.h
  (svn_wc__internal_merge): Update prototype.

Modified:
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/include/svn_wc.h
    subversion/trunk/subversion/libsvn_client/ctx.c
    subversion/trunk/subversion/libsvn_client/merge.c
    subversion/trunk/subversion/libsvn_client/switch.c
    subversion/trunk/subversion/libsvn_client/update.c
    subversion/trunk/subversion/libsvn_wc/deprecated.c
    subversion/trunk/subversion/libsvn_wc/merge.c
    subversion/trunk/subversion/libsvn_wc/props.c
    subversion/trunk/subversion/libsvn_wc/props.h
    subversion/trunk/subversion/libsvn_wc/update_editor.c
    subversion/trunk/subversion/libsvn_wc/wc.h

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Fri Apr 29 19:48:48 2011
@@ -945,6 +945,12 @@ typedef struct svn_client_ctx_t
    * @since New in 1.5. */
   const char *client_name;
 
+  /** Conflict resolution callback and baton, if available. NULL means that
+   * subversion should try @c conflict_func.
+   * @since New in 1.7. */
+  svn_wc_conflict_resolver_func2_t conflict_func2;
+  void *conflict_baton2;
+
   /** A working copy context for the client operation to use.
    * This is initialized by svn_client_create_context() and should never
    * be @c NULL.

Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Fri Apr 29 19:48:48 2011
@@ -5416,7 +5416,7 @@ svn_wc_get_update_editor4(const svn_delt
                           svn_boolean_t server_performs_filtering,
                           const char *diff3_cmd,
                           const apr_array_header_t *preserved_exts,
-                          svn_wc_conflict_resolver_func_t conflict_func,
+                          svn_wc_conflict_resolver_func2_t conflict_func,
                           void *conflict_baton,
                           svn_wc_external_update_t external_func,
                           void *external_baton,
@@ -5441,6 +5441,9 @@ svn_wc_get_update_editor4(const svn_delt
  * Always sets @a adds_as_modification to TRUE and @a server_performs_filtering
  * to FALSE.
  *
+ * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
+ * svn_wc_conflict_resolver_func2_t.
+ *
  * This function assumes that @a diff3_cmd is path encoded. Later versions
  * assume utf-8.
  *
@@ -5549,7 +5552,7 @@ svn_wc_get_switch_editor4(const svn_delt
                           svn_boolean_t server_performs_filtering,
                           const char *diff3_cmd,
                           const apr_array_header_t *preserved_exts,
-                          svn_wc_conflict_resolver_func_t conflict_func,
+                          svn_wc_conflict_resolver_func2_t conflict_func,
                           void *conflict_baton,
                           svn_wc_external_update_t external_func,
                           void *external_baton,
@@ -5572,6 +5575,9 @@ svn_wc_get_switch_editor4(const svn_delt
  *
  * Always sets @a server_performs_filtering to FALSE.
  *
+ * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
+ * svn_wc_conflict_resolver_func2_t.
+ *
  * This function assumes that @a diff3_cmd is path encoded. Later versions
  * assume utf-8.
  *
@@ -6459,7 +6465,7 @@ svn_wc_merge4(enum svn_wc_merge_outcome_
               const char *diff3_cmd,
               const apr_array_header_t *merge_options,
               const apr_array_header_t *prop_diff,
-              svn_wc_conflict_resolver_func_t conflict_func,
+              svn_wc_conflict_resolver_func2_t conflict_func,
               void *conflict_baton,
               svn_cancel_func_t cancel_func,
               void *cancel_baton,
@@ -6469,6 +6475,9 @@ svn_wc_merge4(enum svn_wc_merge_outcome_
  * baton. It doesn't support a cancel function or tracking origin version
  * information.
  *
+ * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
+ * svn_wc_conflict_resolver_func2_t.
+ *
  * This function assumes that @a diff3_cmd is path encoded. Later versions
  * assume utf-8.
  *
@@ -6570,7 +6579,7 @@ svn_wc_merge_props3(svn_wc_notify_state_
                     apr_hash_t *baseprops,
                     const apr_array_header_t *propchanges,
                     svn_boolean_t dry_run,
-                    svn_wc_conflict_resolver_func_t conflict_func,
+                    svn_wc_conflict_resolver_func2_t conflict_func,
                     void *conflict_baton,
                     svn_cancel_func_t cancel_func,
                     void *cancel_baton,
@@ -6585,6 +6594,9 @@ svn_wc_merge_props3(svn_wc_notify_state_
  * functionality is not supported on newer APIs -- pristine information
  * should only be changed through an update editor drive.
  *
+ * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
+ * svn_wc_conflict_resolver_func2_t.
+ *
  * For compatibility reasons this function returns
  * #SVN_ERR_UNVERSIONED_RESOURCE, when svn_wc_merge_props3 would return either
  * #SVN_ERR_WC_PATH_NOT_FOUND or #SVN_ERR_WC_PATH_UNEXPECTED_STATUS.

Modified: subversion/trunk/subversion/libsvn_client/ctx.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/ctx.c?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/ctx.c (original)
+++ subversion/trunk/subversion/libsvn_client/ctx.c Fri Apr 29 19:48:48 2011
@@ -31,6 +31,8 @@
 #include "svn_client.h"
 #include "svn_error.h"
 
+#include "private/svn_wc_private.h"
+
 
 /*** Code. ***/
 
@@ -46,14 +48,47 @@ call_notify_func(void *baton, const svn_
                      n->revision);
 }
 
+static svn_error_t *
+call_conflict_func(svn_wc_conflict_result_t **result,
+                   const svn_wc_conflict_description2_t *conflict,
+                   void *baton,
+                   apr_pool_t *result_pool,
+                   apr_pool_t *scratch_pool)
+{
+  svn_client_ctx_t *ctx = baton;
+
+  if (ctx->conflict_func)
+    {
+      svn_wc_conflict_description_t *cd = svn_wc__cd2_to_cd(conflict,
+                                                        scratch_pool);
+
+      SVN_ERR(ctx->conflict_func(result, cd, ctx->conflict_baton,
+                                 result_pool));
+    }
+  else
+    {
+      /* We have to set a result; so we postpone */
+      *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
+                                              NULL, result_pool);
+    }
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_client_create_context(svn_client_ctx_t **ctx,
                           apr_pool_t *pool)
 {
   *ctx = apr_pcalloc(pool, sizeof(svn_client_ctx_t));
+
   (*ctx)->notify_func2 = call_notify_func;
+  (*ctx)->notify_baton2 = *ctx;
+
+  (*ctx)->conflict_func2 = call_conflict_func;
+  (*ctx)->conflict_baton2 = *ctx;
+
   SVN_ERR(svn_wc_context_create(&(*ctx)->wc_ctx, NULL /* config */, pool,
                                 pool));
-  (*ctx)->notify_baton2 = *ctx;
+  
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Fri Apr 29 19:48:48 2011
@@ -1114,7 +1114,7 @@ merge_props_changed(svn_wc_notify_state_
 
       err = svn_wc_merge_props3(state, ctx->wc_ctx, local_abspath, NULL, NULL,
                                 original_props, props, merge_b->dry_run,
-                                ctx->conflict_func, ctx->conflict_baton,
+                                ctx->conflict_func2, ctx->conflict_baton2,
                                 ctx->cancel_func, ctx->cancel_baton,
                                 subpool);
 
@@ -1233,7 +1233,7 @@ merge_dir_props_changed(svn_wc_notify_st
 typedef struct conflict_resolver_baton_t
 {
   /* The wrapped callback and baton. */
-  svn_wc_conflict_resolver_func_t wrapped_func;
+  svn_wc_conflict_resolver_func2_t wrapped_func;
   void *wrapped_baton;
 
   /* The list of any paths which remained in conflict after a
@@ -1250,21 +1250,25 @@ typedef struct conflict_resolver_baton_t
    resolution attempt from BATON->wrapped_func. */
 static svn_error_t *
 conflict_resolver(svn_wc_conflict_result_t **result,
-                  const svn_wc_conflict_description_t *description,
-                  void *baton, apr_pool_t *pool)
+                  const svn_wc_conflict_description2_t *description,
+                  void *baton,
+                  apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool)
 {
   svn_error_t *err;
   conflict_resolver_baton_t *conflict_b = baton;
 
   if (conflict_b->wrapped_func)
     err = (*conflict_b->wrapped_func)(result, description,
-                                      conflict_b->wrapped_baton, pool);
+                                      conflict_b->wrapped_baton,
+                                      result_pool,
+                                      scratch_pool);
   else
     {
       /* If we have no wrapped callback to invoke, then we still need
          to behave like a proper conflict-callback ourselves.  */
       *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
-                                              NULL, pool);
+                                              NULL, result_pool);
       err = SVN_NO_ERROR;
     }
 
@@ -1273,7 +1277,7 @@ conflict_resolver(svn_wc_conflict_result
       || (*result && ((*result)->choice == svn_wc_conflict_choose_postpone)))
     {
       const char *conflicted_path = apr_pstrdup(conflict_b->pool,
-                                                description->path);
+                                                description->local_abspath);
 
       if (*conflict_b->conflicted_paths == NULL)
         *conflict_b->conflicted_paths = apr_hash_make(conflict_b->pool);
@@ -1464,8 +1468,8 @@ merge_file_changed(svn_wc_notify_state_t
       SVN_ERR(svn_wc_text_modified_p2(&has_local_mods, merge_b->ctx->wc_ctx,
                                       mine_abspath, FALSE, subpool));
 
-      conflict_baton.wrapped_func = merge_b->ctx->conflict_func;
-      conflict_baton.wrapped_baton = merge_b->ctx->conflict_baton;
+      conflict_baton.wrapped_func = merge_b->ctx->conflict_func2;
+      conflict_baton.wrapped_baton = merge_b->ctx->conflict_baton2;
       conflict_baton.conflicted_paths = &merge_b->conflicted_paths;
       conflict_baton.pool = merge_b->pool;
 

Modified: subversion/trunk/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/switch.c?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/switch.c (original)
+++ subversion/trunk/subversion/libsvn_client/switch.c Fri Apr 29 19:48:48 2011
@@ -224,7 +224,7 @@ switch_internal(svn_revnum_t *result_rev
                                     depth_is_sticky, allow_unver_obstructions,
                                     server_supports_depth,
                                     diff3_cmd, preserved_exts,
-                                    ctx->conflict_func, ctx->conflict_baton,
+                                    ctx->conflict_func2, ctx->conflict_baton2,
                                     svn_client__external_info_gatherer, &efb,
                                     ctx->cancel_func, ctx->cancel_baton,
                                     ctx->notify_func2, ctx->notify_baton2,

Modified: subversion/trunk/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/update.c?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/update.c (original)
+++ subversion/trunk/subversion/libsvn_client/update.c Fri Apr 29 19:48:48 2011
@@ -241,7 +241,7 @@ update_internal(svn_revnum_t *result_rev
                                     adds_as_modification,
                                     server_supports_depth,
                                     diff3_cmd, preserved_exts,
-                                    ctx->conflict_func, ctx->conflict_baton,
+                                    ctx->conflict_func2, ctx->conflict_baton2,
                                     ignore_externals
                                         ? NULL
                                         : svn_client__external_info_gatherer,

Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Fri Apr 29 19:48:48 2011
@@ -2321,6 +2321,30 @@ svn_wc_prop_get(const svn_string_t **val
   return svn_error_return(svn_wc_context_destroy(wc_ctx));
 }
 
+/* baton for conflict_func_1to2_wrapper */
+struct conflict_func_1to2_baton
+{
+  svn_wc_conflict_resolver_func_t inner_func;
+  void *inner_baton;
+};
+
+
+/* Implements svn_wc_conflict_resolver_func2_t */
+static svn_error_t *
+conflict_func_1to2_wrapper(svn_wc_conflict_result_t **result,
+                           const svn_wc_conflict_description2_t *conflict,
+                           void *baton,
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool)
+{
+  struct conflict_func_1to2_baton *btn = baton;
+  svn_wc_conflict_description_t *cd = svn_wc__cd2_to_cd(conflict,
+                                                        scratch_pool);
+
+  return svn_error_return(btn->inner_func(result, cd, btn->inner_baton,
+                                          result_pool));
+}
+
 svn_error_t *
 svn_wc_merge_props2(svn_wc_notify_state_t *state,
                     const char *path,
@@ -2335,9 +2359,13 @@ svn_wc_merge_props2(svn_wc_notify_state_
 {
   const char *local_abspath;
   svn_error_t *err;
+  struct conflict_func_1to2_baton conflict_wrapper;
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
 
+  conflict_wrapper.inner_func = conflict_func;
+  conflict_wrapper.inner_baton = conflict_baton;
+
   err = svn_wc__perform_props_merge(state,
                                     svn_wc__adm_get_db(adm_access),
                                     local_abspath,
@@ -2347,7 +2375,9 @@ svn_wc_merge_props2(svn_wc_notify_state_
                                     propchanges,
                                     base_merge,
                                     dry_run,
-                                    conflict_func, conflict_baton,
+                                    conflict_func ? conflict_func_1to2_wrapper
+                                                  : NULL,
+                                    &conflict_wrapper,
                                     NULL, NULL,
                                     scratch_pool);
 
@@ -3029,6 +3059,7 @@ svn_wc_get_update_editor3(svn_revnum_t *
   svn_wc__db_t *db = svn_wc__adm_get_db(anchor);
   svn_wc_external_update_t external_func = NULL;
   struct traversal_info_update_baton *eb = NULL;
+  struct conflict_func_1to2_baton *cfw = NULL;
 
   SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL, db, pool));
 
@@ -3040,6 +3071,13 @@ svn_wc_get_update_editor3(svn_revnum_t *
       external_func = traversal_info_update;
     }
 
+  if (conflict_func)
+    {
+      cfw = apr_pcalloc(pool, sizeof(*cfw));
+      cfw->inner_func = conflict_func;
+      cfw->inner_baton = conflict_baton;
+    }
+
   if (diff3_cmd)
     SVN_ERR(svn_path_cstring_to_utf8(&diff3_cmd, diff3_cmd, pool));
 
@@ -3055,7 +3093,9 @@ svn_wc_get_update_editor3(svn_revnum_t *
                                     FALSE /* server_performs_filtering */,
                                     diff3_cmd,
                                     preserved_exts,
-                                    conflict_func, conflict_baton,
+                                    conflict_func ? conflict_func_1to2_wrapper
+                                                  : NULL,
+                                    cfw,
                                     external_func, eb,
                                     cancel_func, cancel_baton,
                                     notify_func, notify_baton,
@@ -3148,6 +3188,7 @@ svn_wc_get_switch_editor3(svn_revnum_t *
   svn_wc__db_t *db = svn_wc__adm_get_db(anchor);
   svn_wc_external_update_t external_func = NULL;
   struct traversal_info_update_baton *eb = NULL;
+  struct conflict_func_1to2_baton *cfw = NULL;
 
   SVN_ERR_ASSERT(switch_url && svn_uri_is_canonical(switch_url, pool));
 
@@ -3161,6 +3202,13 @@ svn_wc_get_switch_editor3(svn_revnum_t *
       external_func = traversal_info_update;
     }
 
+  if (conflict_func)
+    {
+      cfw = apr_pcalloc(pool, sizeof(*cfw));
+      cfw->inner_func = conflict_func;
+      cfw->inner_baton = conflict_baton;
+    }
+
   if (diff3_cmd)
     SVN_ERR(svn_path_cstring_to_utf8(&diff3_cmd, diff3_cmd, pool));
 
@@ -3175,7 +3223,9 @@ svn_wc_get_switch_editor3(svn_revnum_t *
                                     FALSE /* server_performs_filtering */,
                                     diff3_cmd,
                                     preserved_exts,
-                                    conflict_func, conflict_baton,
+                                    conflict_func ? conflict_func_1to2_wrapper
+                                                  : NULL,
+                                    cfw,
                                     external_func, eb,
                                     cancel_func, cancel_baton,
                                     notify_func, notify_baton,
@@ -3808,6 +3858,7 @@ svn_wc_merge3(enum svn_wc_merge_outcome_
   svn_wc_context_t *wc_ctx;
   svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
   const char *left_abspath, *right_abspath, *target_abspath;
+  struct conflict_func_1to2_baton cfw;
 
   SVN_ERR(svn_dirent_get_absolute(&left_abspath, left, pool));
   SVN_ERR(svn_dirent_get_absolute(&right_abspath, right, pool));
@@ -3815,6 +3866,9 @@ svn_wc_merge3(enum svn_wc_merge_outcome_
 
   SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL /* config */, db, pool));
 
+  cfw.inner_func = conflict_func;
+  cfw.inner_baton = conflict_baton;
+
   if (diff3_cmd)
     SVN_ERR(svn_path_cstring_to_utf8(&diff3_cmd, diff3_cmd, pool));
 
@@ -3832,7 +3886,8 @@ svn_wc_merge3(enum svn_wc_merge_outcome_
                         diff3_cmd,
                         merge_options,
                         prop_diff,
-                        conflict_func, conflict_baton,
+                        conflict_func ? conflict_func_1to2_wrapper : NULL,
+                        &cfw,
                         NULL, NULL,
                         pool));
 

Modified: subversion/trunk/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/merge.c?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/merge.c (original)
+++ subversion/trunk/subversion/libsvn_wc/merge.c Fri Apr 29 19:48:48 2011
@@ -790,7 +790,7 @@ preserve_pre_merge_files(svn_skel_t **wo
 }
 
 /* Helper for maybe_resolve_conflicts() below. */
-static const svn_wc_conflict_description_t *
+static const svn_wc_conflict_description2_t *
 setup_text_conflict_desc(const char *left_abspath,
                          const char *right_abspath,
                          const char *target_abspath,
@@ -816,7 +816,7 @@ setup_text_conflict_desc(const char *lef
   cdesc->src_left_version = left_version;
   cdesc->src_right_version = right_version;
 
-  return svn_wc__cd2_to_cd(cdesc, pool);
+  return cdesc;
 }
 
 /* XXX Insane amount of parameters... */
@@ -839,7 +839,7 @@ maybe_resolve_conflicts(svn_skel_t **wor
                         const char *detranslated_target,
                         const svn_prop_t *mimeprop,
                         svn_diff_file_options_t *options,
-                        svn_wc_conflict_resolver_func_t conflict_func,
+                        svn_wc_conflict_resolver_func2_t conflict_func,
                         void *conflict_baton,
                         svn_cancel_func_t cancel_func,
                         void *cancel_baton,
@@ -861,11 +861,11 @@ maybe_resolve_conflicts(svn_skel_t **wor
       /* If there is no interactive conflict resolution then we are effectively
          postponing conflict resolution. */
       result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
-                                             NULL, scratch_pool);
+                                             NULL, result_pool);
     }
   else
     {
-      const svn_wc_conflict_description_t *cdesc;
+      const svn_wc_conflict_description2_t *cdesc;
 
       cdesc = setup_text_conflict_desc(left_abspath,
                                        right_abspath,
@@ -878,7 +878,8 @@ maybe_resolve_conflicts(svn_skel_t **wor
                                        FALSE,
                                        scratch_pool);
 
-      SVN_ERR(conflict_func(&result, cdesc, conflict_baton, scratch_pool));
+      SVN_ERR(conflict_func(&result, cdesc, conflict_baton, scratch_pool,
+                            scratch_pool));
       if (result == NULL)
         return svn_error_create(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
                                 NULL, _("Conflict callback violated API:"
@@ -944,7 +945,7 @@ merge_text_file(svn_skel_t **work_items,
                 const char *copyfrom_text,
                 const char *detranslated_target_abspath,
                 const svn_prop_t *mimeprop,
-                svn_wc_conflict_resolver_func_t conflict_func,
+                svn_wc_conflict_resolver_func2_t conflict_func,
                 void *conflict_baton,
                 svn_cancel_func_t cancel_func,
                 void *cancel_baton,
@@ -1120,7 +1121,7 @@ merge_binary_file(svn_skel_t **work_item
                   const svn_wc_conflict_version_t *right_version,
                   const char *detranslated_target_abspath,
                   const svn_prop_t *mimeprop,
-                  svn_wc_conflict_resolver_func_t conflict_func,
+                  svn_wc_conflict_resolver_func2_t conflict_func,
                   void *conflict_baton,
                   apr_pool_t *result_pool,
                   apr_pool_t *scratch_pool)
@@ -1175,7 +1176,7 @@ merge_binary_file(svn_skel_t **work_item
   if (conflict_func)
     {
       svn_wc_conflict_result_t *result = NULL;
-      const svn_wc_conflict_description_t *cdesc;
+      const svn_wc_conflict_description2_t *cdesc;
       const char *install_from = NULL;
 
       cdesc = setup_text_conflict_desc(left_abspath, right_abspath,
@@ -1185,7 +1186,7 @@ merge_binary_file(svn_skel_t **work_item
                                        detranslated_target_abspath,
                                        mimeprop, TRUE, pool);
 
-      SVN_ERR(conflict_func(&result, cdesc, conflict_baton, pool));
+      SVN_ERR(conflict_func(&result, cdesc, conflict_baton, pool, pool));
       if (result == NULL)
         return svn_error_create(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
                                 NULL, _("Conflict callback violated API:"
@@ -1332,7 +1333,7 @@ svn_wc__internal_merge(svn_skel_t **work
                        const char *diff3_cmd,
                        const apr_array_header_t *merge_options,
                        const apr_array_header_t *prop_diff,
-                       svn_wc_conflict_resolver_func_t conflict_func,
+                       svn_wc_conflict_resolver_func2_t conflict_func,
                        void *conflict_baton,
                        svn_cancel_func_t cancel_func,
                        void *cancel_baton,
@@ -1471,7 +1472,7 @@ svn_wc_merge4(enum svn_wc_merge_outcome_
               const char *diff3_cmd,
               const apr_array_header_t *merge_options,
               const apr_array_header_t *prop_diff,
-              svn_wc_conflict_resolver_func_t conflict_func,
+              svn_wc_conflict_resolver_func2_t conflict_func,
               void *conflict_baton,
               svn_cancel_func_t cancel_func,
               void *cancel_baton,

Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Fri Apr 29 19:48:48 2011
@@ -220,7 +220,7 @@ svn_wc__perform_props_merge(svn_wc_notif
                             const apr_array_header_t *propchanges,
                             svn_boolean_t base_merge,
                             svn_boolean_t dry_run,
-                            svn_wc_conflict_resolver_func_t conflict_func,
+                            svn_wc_conflict_resolver_func2_t conflict_func,
                             void *conflict_baton,
                             svn_cancel_func_t cancel_func,
                             void *cancel_baton,
@@ -365,7 +365,7 @@ svn_wc_merge_props3(svn_wc_notify_state_
                     apr_hash_t *baseprops,
                     const apr_array_header_t *propchanges,
                     svn_boolean_t dry_run,
-                    svn_wc_conflict_resolver_func_t conflict_func,
+                    svn_wc_conflict_resolver_func2_t conflict_func,
                     void *conflict_baton,
                     svn_cancel_func_t cancel_func,
                     void *cancel_baton,
@@ -716,7 +716,7 @@ maybe_generate_propconflict(svn_boolean_
                             const svn_string_t *new_val,
                             const svn_string_t *base_val,
                             const svn_string_t *working_val,
-                            svn_wc_conflict_resolver_func_t conflict_func,
+                            svn_wc_conflict_resolver_func2_t conflict_func,
                             void *conflict_baton,
                             svn_boolean_t dry_run,
                             apr_pool_t *scratch_pool)
@@ -868,8 +868,8 @@ maybe_generate_propconflict(svn_boolean_
 
   /* Invoke the interactive conflict callback. */
   {
-    svn_wc_conflict_description_t *cd = svn_wc__cd2_to_cd(cdesc, scratch_pool);
-    SVN_ERR(conflict_func(&result, cd, conflict_baton, scratch_pool));
+    SVN_ERR(conflict_func(&result, cdesc, conflict_baton, scratch_pool,
+                          scratch_pool));
   }
   if (result == NULL)
     {
@@ -970,7 +970,7 @@ apply_single_prop_add(svn_wc_notify_stat
                       const char *propname,
                       const svn_string_t *base_val,
                       const svn_string_t *new_val,
-                      svn_wc_conflict_resolver_func_t conflict_func,
+                      svn_wc_conflict_resolver_func2_t conflict_func,
                       void *conflict_baton,
                       svn_boolean_t dry_run,
                       apr_pool_t *result_pool,
@@ -1067,7 +1067,7 @@ apply_single_prop_delete(svn_wc_notify_s
                          const char *propname,
                          const svn_string_t *base_val,
                          const svn_string_t *old_val,
-                         svn_wc_conflict_resolver_func_t conflict_func,
+                         svn_wc_conflict_resolver_func2_t conflict_func,
                          void *conflict_baton,
                          svn_boolean_t dry_run,
                          apr_pool_t *result_pool,
@@ -1166,7 +1166,7 @@ apply_single_mergeinfo_prop_change(svn_w
                                    const svn_string_t *base_val,
                                    const svn_string_t *old_val,
                                    const svn_string_t *new_val,
-                                   svn_wc_conflict_resolver_func_t conflict_func,
+                                   svn_wc_conflict_resolver_func2_t conflict_func,
                                    void *conflict_baton,
                                    svn_boolean_t dry_run,
                                    apr_pool_t *result_pool,
@@ -1275,7 +1275,7 @@ apply_single_generic_prop_change(svn_wc_
                                  const svn_string_t *base_val,
                                  const svn_string_t *old_val,
                                  const svn_string_t *new_val,
-                                 svn_wc_conflict_resolver_func_t conflict_func,
+                                 svn_wc_conflict_resolver_func2_t conflict_func,
                                  void *conflict_baton,
                                  svn_boolean_t dry_run,
                                  apr_pool_t *result_pool,
@@ -1339,7 +1339,7 @@ apply_single_prop_change(svn_wc_notify_s
                          const svn_string_t *base_val,
                          const svn_string_t *old_val,
                          const svn_string_t *new_val,
-                         svn_wc_conflict_resolver_func_t conflict_func,
+                         svn_wc_conflict_resolver_func2_t conflict_func,
                          void *conflict_baton,
                          svn_boolean_t dry_run,
                          apr_pool_t *result_pool,
@@ -1406,7 +1406,7 @@ svn_wc__merge_props(svn_skel_t **work_it
                     const apr_array_header_t *propchanges,
                     svn_boolean_t base_merge,
                     svn_boolean_t dry_run,
-                    svn_wc_conflict_resolver_func_t conflict_func,
+                    svn_wc_conflict_resolver_func2_t conflict_func,
                     void *conflict_baton,
                     svn_cancel_func_t cancel_func,
                     void *cancel_baton,

Modified: subversion/trunk/subversion/libsvn_wc/props.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.h?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.h (original)
+++ subversion/trunk/subversion/libsvn_wc/props.h Fri Apr 29 19:48:48 2011
@@ -115,7 +115,7 @@ svn_wc__merge_props(svn_skel_t **work_it
                     const apr_array_header_t *propchanges,
                     svn_boolean_t base_merge,
                     svn_boolean_t dry_run,
-                    svn_wc_conflict_resolver_func_t conflict_func,
+                    svn_wc_conflict_resolver_func2_t conflict_func,
                     void *conflict_baton,
                     svn_cancel_func_t cancel_func,
                     void *cancel_baton,
@@ -189,7 +189,7 @@ svn_wc__perform_props_merge(svn_wc_notif
                             const apr_array_header_t *propchanges,
                             svn_boolean_t base_merge,
                             svn_boolean_t dry_run,
-                            svn_wc_conflict_resolver_func_t conflict_func,
+                            svn_wc_conflict_resolver_func2_t conflict_func,
                             void *conflict_baton,
                             svn_cancel_func_t cancel_func,
                             void *cancel_baton,

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Fri Apr 29 19:48:48 2011
@@ -224,7 +224,7 @@ struct edit_baton
 
   /* This editor will invoke a interactive conflict-resolution
      callback, if available. */
-  svn_wc_conflict_resolver_func_t conflict_func;
+  svn_wc_conflict_resolver_func2_t conflict_func;
   void *conflict_baton;
 
   /* Subtrees that were skipped during the edit, and therefore shouldn't
@@ -4115,7 +4115,7 @@ make_editor(svn_revnum_t *target_revisio
             void *notify_baton,
             svn_cancel_func_t cancel_func,
             void *cancel_baton,
-            svn_wc_conflict_resolver_func_t conflict_func,
+            svn_wc_conflict_resolver_func2_t conflict_func,
             void *conflict_baton,
             svn_wc_external_update_t external_func,
             void *external_baton,
@@ -4279,7 +4279,7 @@ svn_wc_get_update_editor4(const svn_delt
                           svn_boolean_t server_performs_filtering,
                           const char *diff3_cmd,
                           const apr_array_header_t *preserved_exts,
-                          svn_wc_conflict_resolver_func_t conflict_func,
+                          svn_wc_conflict_resolver_func2_t conflict_func,
                           void *conflict_baton,
                           svn_wc_external_update_t external_func,
                           void *external_baton,
@@ -4317,7 +4317,7 @@ svn_wc_get_switch_editor4(const svn_delt
                           svn_boolean_t server_performs_filtering,
                           const char *diff3_cmd,
                           const apr_array_header_t *preserved_exts,
-                          svn_wc_conflict_resolver_func_t conflict_func,
+                          svn_wc_conflict_resolver_func2_t conflict_func,
                           void *conflict_baton,
                           svn_wc_external_update_t external_func,
                           void *external_baton,

Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1097931&r1=1097930&r2=1097931&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Fri Apr 29 19:48:48 2011
@@ -471,7 +471,7 @@ svn_wc__internal_merge(svn_skel_t **work
                        const char *diff3_cmd,
                        const apr_array_header_t *merge_options,
                        const apr_array_header_t *prop_diff,
-                       svn_wc_conflict_resolver_func_t conflict_func,
+                       svn_wc_conflict_resolver_func2_t conflict_func,
                        void *conflict_baton,
                        svn_cancel_func_t cancel_func,
                        void *cancel_baton,



Mime
View raw message