[PATCH 3 of 5 evolve-ext-V2] evolve: simplify the evolve function

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed May 6 02:30:46 CDT 2015



On 05/05/2015 05:42 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1430429137 25200
> #      Thu Apr 30 14:25:37 2015 -0700
> # Node ID d443bbbe9a7d0a55e1e4027204b56c639f5074a9
> # Parent  ced767d4eeff2d68680cdd60ed36139f3087eaf2
> evolve: simplify the evolve function
>
> We compute the troubles once and use it in two places instead of recomputing
> them just to count them.
>
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -1258,10 +1258,11 @@
>       dryrunopt = opts['dry_run']
>       confirmopt = opts['confirm']
>       ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve')
> +    troubled = set(repo.revs('troubled()'))

I'm a bit sad we have to turn that into a set. Do we really have to?
(I took the patch anyway)

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list