Thanks for the reply.
I did see code section you refer to however the svn_client__resolve_conflicts will only be called if you have ctx->conflict_func2.
That function (AFAIK) is only installed if an “accept” option is supplied as the code below
/* Install a legacy conflict handler if the --accept option was given.
* Else, svn_client_merge5() may abort the merge in an undesirable way.
* See the docstring at conflict_func_merge_cmd() for details */
if (opt_state->accept_which != svn_cl__accept_unspecified)
struct conflict_func_merge_cmd_baton *b = apr_pcalloc(pool, sizeof(*b));
b->accept_which = opt_state->accept_which;
SVN_ERR(svn_dirent_get_absolute(&b->path_prefix, "", pool));
b->conflict_stats = conflict_stats;
ctx->conflict_func2 = conflict_func_merge_cmd;
ctx->conflict_baton2 = b;
The resolver that runs post run_merge is however run regardless if there is an accept argument or not.
If no accept option is given the user is ultimately prompted to resolve the conflict (dry-run or no dry-run).
/* If we are in interactive mode and either the user gave no --accept
* option or the option did not apply, then prompt. */
if (option_id == svn_client_conflict_option_unspecified)
svn_boolean_t resolved = FALSE;
svn_boolean_t postponed = FALSE;
svn_boolean_t printed_description = FALSE;
*quit = FALSE;
while (!resolved && !postponed && !*quit)
err = resolve_conflict_interactively(&resolved, &postponed,
Sorry I’m no trying to be argumentative I just need to clear on this one aspect.
Thanks for any help.
> On 31 Oct 2018, at 08:32, Stefan Sperling <stsp_at_elego.de> wrote:
> On Tue, Oct 30, 2018 at 06:39:49PM +0000, Jonathan Guy wrote:
>> (svn_cl__merge): Suppress the interactive conflict resolver
>> if a merge has been performed with the dry-run option.
> Hi Jonathan,
> Thank your for the patch. I am afraid I misled you earlier by suggesting
> that you send a patch for the issue. This is in fact not a problem in
> the current implementation because the dry_run flag gets passed down
> into libsvn_client, where it takes part in the decision about running
> the conflict resolver.
> Specifically, this part of the do_merge() function in the file
> subversion/libsvn_client/merge.c checks the flag:
> /* Give the conflict resolver callback the opportunity to
> * resolve any conflicts that were raised. If it resolves all
> * of them, go around again to merge the next sub-range (if any). */
> if (conflicted_range_report && ctx->conflict_func2 && ! dry_run)
> svn_boolean_t conflicts_remain;
> &conflicts_remain, merge_cmd_baton.conflicted_paths,
> ctx, iterpool));
> if (conflicts_remain)
> So your patch is redundant and we don't need to apply it.
> I should have tested the current behaviour before recommending that
> you send a patch.
> Regardless, thank you for your contribution!
Received on 2018-10-31 10:46:53 CET