[PATCH 1 of 3] context: drop a superfluous "if" clause in blockdescendants()
Yuya Nishihara
yuya at tcha.org
Fri Apr 14 10:34:31 EDT 2017
On Fri, 14 Apr 2017 15:03:54 +0200, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1492171660 -7200
> # Fri Apr 14 14:07:40 2017 +0200
> # Node ID 45c2968ee4ed385aa6ab64b7136a38180ca03ec5
> # Parent b1fe2c5dd2c65a3774c848e0113b8fdf82e4bd95
> # Available At http://hg.logilab.org/users/dlaxalde/hg
> # hg pull http://hg.logilab.org/users/dlaxalde/hg -r 45c2968ee4ed
> context: drop a superfluous "if" clause in blockdescendants()
>
> This `i in seen` should not occur since 'i' comes from filelog.descendants()
> which yields unique revisions.
>
> diff --git a/mercurial/context.py b/mercurial/context.py
> --- a/mercurial/context.py
> +++ b/mercurial/context.py
> @@ -1216,8 +1216,6 @@ def blockdescendants(fctx, fromline, tol
> fl = fctx.filelog()
> seen = {fctx.filerev(): (fctx, (fromline, toline))}
> for i in fl.descendants([fctx.filerev()]):
> - if i in seen:
> - continue
I've folded this with the previous patch, thanks. I'll look into the remainder
tomorrow. I need to refresh my brain.
More information about the Mercurial-devel
mailing list