depth: use lower lever function to compute missing
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Sat, 11 Mar 2017 12:15:08 -0800
changeset 2088 9f7ce656bfdf
parent 2087 0c2371542687
child 2089 338d5600376c
depth: use lower lever function to compute missing The time spend parsing the revset is noticeable.
hgext3rd/evolve/utility.py
--- a/hgext3rd/evolve/utility.py	Sat Mar 11 10:26:30 2017 -0800
+++ b/hgext3rd/evolve/utility.py	Sat Mar 11 12:15:08 2017 -0800
@@ -47,7 +47,7 @@
                 # multiple ancestors, we pick the highest and search all missing bits
                 anc = max(cl.rev(a) for a in ancs)
                 revdepth = depth(repo, anc)
-                revdepth += len(repo.revs('only(%d, %d)', rev, anc))
+                revdepth += len(cl.findmissingrevs(common=[anc], heads=[rev]))
         _depthcache[n] = revdepth
     # actual_depth = len(list(cl.ancestors([rev], inclusive=True)))
     # assert revdepth == actual_depth, (rev, revdepth, actual_depth)