[PATCH 1 of 3] context: drop a superfluous "if" clause in blockdescendants()
Denis Laxalde
denis at laxalde.org
Fri Apr 14 13:03:54 UTC 2017
# 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
c = fctx.filectx(i)
inrange = False
for x in fl.parentrevs(i):
More information about the Mercurial-devel
mailing list