Author: stsp
Date: Tue Jun 26 13:58:06 2012
New Revision: 1354020
URL: http://svn.apache.org/viewvc?rev=1354020&view=rev
Log:
Stop tweaking the conflict callback pointers in client context from the
merge code.
* subversion/libsvn_client/merge.c
(merge_dir_props_changed, merge_file_changed): Pass NULL conflict resolution
callbacks into svn_wc_merge_props3() and svn_wc_merge5() to postpone all
conflicts.
(merge_locked, merge_peg_locked, do_symmetric_merge_locked): Stop tweaking
the conflict callback in the client context.
Modified:
subversion/trunk/subversion/libsvn_client/merge.c
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1354020&r1=1354019&r2=1354020&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Tue Jun 26 13:58:06 2012
@@ -1368,7 +1368,7 @@ merge_dir_props_changed(svn_wc_notify_st
SVN_ERR(svn_wc_merge_props3(state, ctx->wc_ctx, local_abspath,
NULL, NULL, original_props, props,
merge_b->dry_run,
- ctx->conflict_func2, ctx->conflict_baton2,
+ NULL, NULL, /* postpone conflicts */
ctx->cancel_func, ctx->cancel_baton,
scratch_pool));
}
@@ -1682,8 +1682,7 @@ merge_file_changed(svn_wc_notify_state_t
left, right,
original_props, prop_changes,
merge_b->dry_run,
- ctx->conflict_func2,
- ctx->conflict_baton2,
+ NULL, NULL, /* postpone conflicts */
ctx->cancel_func, ctx->cancel_baton,
scratch_pool));
}
@@ -1716,8 +1715,10 @@ merge_file_changed(svn_wc_notify_state_t
SVN_ERR(svn_wc_text_modified_p2(&has_local_mods, ctx->wc_ctx,
local_abspath, FALSE, scratch_pool));
- conflict_baton.wrapped_func = ctx->conflict_func2;
- conflict_baton.wrapped_baton = ctx->conflict_baton2;
+ /* Postpone all conflicts. */
+ conflict_baton.wrapped_func = NULL;
+ conflict_baton.wrapped_baton = NULL;
+
conflict_baton.conflicted_paths = &merge_b->conflicted_paths;
conflict_baton.pool = merge_b->pool;
@@ -9547,8 +9548,6 @@ merge_locked(const char *source1,
svn_boolean_t same_repos;
/* Resolve conflicts post-merge for 1.7 and above API users. */
svn_boolean_t resolve_conflicts_post_merge = (ctx->conflict_func2 != NULL);
- svn_wc_conflict_resolver_func2_t conflict_func2;
- void *conflict_baton2;
/* ### FIXME: This function really ought to do a history check on
the left and right sides of the merge source, and -- if one is an
@@ -9585,16 +9584,6 @@ merge_locked(const char *source1,
&yca, source1_loc, source2_loc, ra_session1, ctx,
scratch_pool, scratch_pool));
- if (resolve_conflicts_post_merge)
- {
- /* Remove the conflict resolution callback from the client context.
- * We invoke it after of the merge instead of during the merge. */
- conflict_func2 = ctx->conflict_func2;
- conflict_baton2 = ctx->conflict_baton2;
- ctx->conflict_func2 = NULL;
- ctx->conflict_baton2 = NULL;
- }
-
/* Check for a youngest common ancestor. If we have one, we'll be
doing merge tracking.
@@ -9714,7 +9703,8 @@ merge_locked(const char *source1,
"" /* resolve_prop (ALL props) */,
TRUE /* resolve_tree */,
svn_wc_conflict_choose_unspecified,
- conflict_func2, conflict_baton2,
+ ctx->conflict_func2,
+ ctx->conflict_baton2,
ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));
@@ -10982,8 +10972,6 @@ merge_peg_locked(const char *source_path
svn_boolean_t same_repos;
/* Resolve conflicts post-merge for 1.7 and above API users. */
svn_boolean_t resolve_conflicts_post_merge = (ctx->conflict_func2 != NULL);
- svn_wc_conflict_resolver_func2_t conflict_func2;
- void *conflict_baton2;
SVN_ERR_ASSERT(svn_dirent_is_absolute(target_abspath));
@@ -11008,16 +10996,6 @@ merge_peg_locked(const char *source_path
/* Check for same_repos. */
same_repos = is_same_repos(&target->loc, source_loc, TRUE /* strict_urls */);
- if (resolve_conflicts_post_merge)
- {
- /* Remove the conflict resolution callback from the client context.
- * We invoke it after of the merge instead of during the merge. */
- conflict_func2 = ctx->conflict_func2;
- conflict_baton2 = ctx->conflict_baton2;
- ctx->conflict_func2 = NULL;
- ctx->conflict_baton2 = NULL;
- }
-
/* Do the real merge! (We say with confidence that our merge
sources are both ancestral and related.) */
err = do_merge(NULL, NULL, merge_sources, target, ra_session,
@@ -11040,7 +11018,8 @@ merge_peg_locked(const char *source_path
"" /* resolve_prop (ALL props) */,
TRUE /* resolve_tree */,
svn_wc_conflict_choose_unspecified,
- conflict_func2, conflict_baton2,
+ ctx->conflict_func2,
+ ctx->conflict_baton2,
ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));
@@ -11641,22 +11620,10 @@ do_symmetric_merge_locked(const svn_clie
svn_error_t *err;
/* Resolve conflicts post-merge for 1.7 and above API users. */
svn_boolean_t resolve_conflicts_post_merge = (ctx->conflict_func2 != NULL);
- svn_wc_conflict_resolver_func2_t conflict_func2;
- void *conflict_baton2;
SVN_ERR(open_target_wc(&target, target_abspath, TRUE, TRUE, TRUE,
ctx, scratch_pool, scratch_pool));
- if (resolve_conflicts_post_merge)
- {
- /* Remove the conflict resolution callback from the client context.
- * We invoke it after of the merge instead of during the merge. */
- conflict_func2 = ctx->conflict_func2;
- conflict_baton2 = ctx->conflict_baton2;
- ctx->conflict_func2 = NULL;
- ctx->conflict_baton2 = NULL;
- }
-
if (merge->mid)
{
merge_source_t source;
@@ -11722,7 +11689,8 @@ do_symmetric_merge_locked(const svn_clie
"" /* resolve_prop (ALL props) */,
TRUE /* resolve_tree */,
svn_wc_conflict_choose_unspecified,
- conflict_func2, conflict_baton2,
+ ctx->conflict_func2,
+ ctx->conflict_baton2,
ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));