# HG changeset patch # User Boris Feld <boris.f...@octobus.net> # Date 1539904028 -7200 # Fri Oct 19 01:07:08 2018 +0200 # Node ID 2ba5875c72c1f3475a465c2aa7a6463ab4a31704 # Parent a2497966bf47a02572bbad448458d5a4b94fe77e # EXP-Topic bettertroubles # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 2ba5875c72c1 obsolete: prefetch the repo.obsstore used in phasedivergence loop
The speedup is probably quite negligible, but it cannot hurt. diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -916,11 +916,12 @@ def _computephasedivergentset(repo): 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): _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel