[PATCH evolve-ext] evolve: clarify code in _singlesuccessor

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Jun 23 18:59:07 CDT 2015



On 06/22/2015 05:47 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1435020392 25200
> #      Mon Jun 22 17:46:32 2015 -0700
> # Node ID a6b72e1db6ff5743cdb7ada37ef7c9d206b683d1
> # Parent  4198e2fad6ba08c0798c217e7b643fae9c28e81b
> evolve: clarify code in _singlesuccessor

Pushed to main, thanks, (with a small changes)


>
> Before this patch we were not very explicit with this while condition in
> _singlesuccessor. This patch makes it more legible.
>
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -1364,7 +1364,7 @@ def _singlesuccessor(repo, p):
>       ui = repo.ui
>       newer = obsolete.successorssets(repo, obs.node())
>       # search of a parent which is not killed
> -    while not newer or newer == [()]:
> +    while newer == []:

I turned that in 'while not newer:'

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list