[PATCH 2 of 2] resolve: set forcemerge before calling preprocess

Siddharth Agarwal sid at less-broken.com
Sun Mar 20 21:03:07 EDT 2016


On 3/20/16 18:00, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1458521572 25200
> #      Sun Mar 20 17:52:52 2016 -0700
> # Node ID 98fd14c2b4b6b00e8409bb88dee3d0ba26ebaf75
> # Parent  b190b4bd5de25c137286cbb21572e9e1160b415b
> resolve: set forcemerge before calling preprocess

Actually I want to do further refactoring and am going to send a better 
series of patches.

- Siddharth

>
> If the merge driver's preprocess step decides to resolve some files, it is
> important that any custom tools are used, unless the merge driver does further
> overrides. This is already the case for merge, rebase, and other commands that
> take tools, but currently isn't the case for resolve.
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -6033,7 +6033,9 @@ def resolve(ui, repo, *pats, **opts):
>           wctx = repo[None]
>   
>           if ms.mergedriver and ms.mdstate() == 'u':
> -            proceed = mergemod.driverpreprocess(repo, ms, wctx)
> +            with ui.tempconfig('ui', 'forcemerge', opts.get('tool', ''),
> +                               'resolve'):
> +                proceed = mergemod.driverpreprocess(repo, ms, wctx)
>               ms.commit()
>               # allow mark and unmark to go through
>               if not mark and not unmark and not proceed:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list