Author: stsp
Date: Mon Jun 25 20:50:17 2012
New Revision: 1353738
URL: http://svn.apache.org/viewvc?rev=1353738&view=rev
Log:
* subversion/libsvn_client/switch.c
(switch_internal): Stop fiddling with the caller-provided client context.
We were setting the conflict callback fields to NULL in case conflicts
should be resolved post-switch. We aren't supposed to change the context
on behalf of the caller. And there really is no need to do so since we can
pass NULL conflict callbacks to svn_wc__get_switch_editor() instead.
Suggested by: gstein
Modified:
subversion/trunk/subversion/libsvn_client/switch.c
Modified: subversion/trunk/subversion/libsvn_client/switch.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/switch.c?rev=1353738&r1=1353737&r2=1353738&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/switch.c (original)
+++ subversion/trunk/subversion/libsvn_client/switch.c Mon Jun 25 20:50:17 2012
@@ -94,8 +94,6 @@ switch_internal(svn_revnum_t *result_rev
: NULL;
/* Resolve conflicts post-switch for 1.7 and above API users. */
svn_boolean_t resolve_conflicts_post_switch = (ctx->conflict_func2 != NULL);
- svn_wc_conflict_resolver_func2_t conflict_func2;
- void *conflict_baton2;
/* An unknown depth can't be sticky. */
if (depth == svn_depth_unknown)
@@ -222,17 +220,6 @@ switch_internal(svn_revnum_t *result_rev
svn_dirent_dirname(local_abspath, pool));
}
- if (resolve_conflicts_post_switch)
- {
- /* Remove the conflict resolution callback from the client context.
- * We invoke it after of the switch instead of during the switch. */
- conflict_func2 = ctx->conflict_func2;
- conflict_baton2 = ctx->conflict_baton2;
- ctx->conflict_func2 = NULL;
- ctx->conflict_baton2 = NULL;
- }
-
-
SVN_ERR(svn_ra_reparent(ra_session, anchor_url, pool));
/* Fetch the switch (update) editor. If REVISION is invalid, that's
@@ -252,7 +239,10 @@ switch_internal(svn_revnum_t *result_rev
server_supports_depth,
diff3_cmd, preserved_exts,
svn_client__dirent_fetcher, &dfb,
- ctx->conflict_func2, ctx->conflict_baton2,
+ resolve_conflicts_post_switch ?
+ NULL : ctx->conflict_func2,
+ resolve_conflicts_post_switch ?
+ NULL : ctx->conflict_baton2,
NULL, NULL,
ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2,
@@ -347,7 +337,8 @@ switch_internal(svn_revnum_t *result_rev
"" /* 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,
pool));