[PATCH 1 of 2] resolve: move resolve in cmdutil

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Dec 3 00:37:40 CST 2015



On 12/02/2015 04:41 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1449103124 28800
> #      Wed Dec 02 16:38:44 2015 -0800
> # Node ID 8d5a092b64d9ddb7f6481bfe16aaeb6a7dab5951
> # Parent  91905c0c47377520eebdedcfa6bcb73b77e24e0c
> resolve: move resolve in cmdutil
>
> Having resolve in cmdutil makes it easier to call it outside the commands
> module. This patch moves all the code from resolve from commands to cmdutil.
>
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py
> +++ b/mercurial/cmdutil.py
> @@ -2310,6 +2310,165 @@ def forget(ui, repo, match, prefix, expl
>       forgot.extend(f for f in forget if f not in rejected)
>       return bad, forgot
>
> +def resolve(ui, repo, *pats, **opts):
> +    import merge as mergemod

Urg, why are we importing this at this level? are you trying to avoid a 
cycle

Is there other change to the moved code or is it just a plain move 
otherwise?

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list