Mercurial > hg
changeset 40461: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 | 4fe63b573791 |
children | 6e2a24550b7e |
files | mercurial/obsutil.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
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