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.
--- 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