obsolete: prefetch the repo.obsstore used in phasedivergence loop
The speedup is probably quite negligible, but it cannot hurt.
--- a/mercurial/obsolete.py Fri Oct 19 00:53:18 2018 +0200
+++ b/mercurial/obsolete.py Fri Oct 19 01:07:08 2018 +0200
@@ -916,11 +916,12 @@
cl = repo.changelog
torev = cl.nodemap.get
tonode = cl.node
+ obsstore = repo.obsstore
for rev in repo.revs('(not public()) and (not obsolete())'):
# We only evaluate mutable, non-obsolete revision
node = tonode(rev)
# (future) A cache of predecessors may worth if split is very common
- for pnode in obsutil.allpredecessors(repo.obsstore, [node],
+ for pnode in obsutil.allpredecessors(obsstore, [node],
ignoreflags=bumpedfix):
prev = torev(pnode) # unfiltered! but so is phasecache
if (prev is not None) and (phase(repo, prev) <= public):