Mercurial > public > mercurial-scm > hg-stable
diff mercurial/obsutil.py @ 40513:c7618901584d
obsutil: prefetch method in allpredecessors loop
We don't expect a massive speedup from this, but the change was laying around
in my repository and it cannot hurt.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 19 Oct 2018 00:53:18 +0200 |
parents | bae6f1418a95 |
children | 520514af2d93 |
line wrap: on
line diff
--- a/mercurial/obsutil.py Fri Nov 02 14:24:29 2018 -0400 +++ b/mercurial/obsutil.py Fri Oct 19 00:53:18 2018 +0200 @@ -148,10 +148,11 @@ remaining = set(nodes) seen = set(remaining) + prec = obsstore.predecessors.get while remaining: current = remaining.pop() yield current - for mark in obsstore.predecessors.get(current, ()): + for mark in prec(current, ()): # ignore marker flagged with specified flag if mark[2] & ignoreflags: continue