changeset 2174:71c518470e2c

stablerange: use subranges from the main class in findrangemissing This is the last method used on the class.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 22 Mar 2017 19:20:30 +0100
parents 53352bf5b7fc
children 4162dbe7ff5c
files hgext3rd/evolve/obsdiscovery.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obsdiscovery.py	Wed Mar 22 18:55:26 2017 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py	Wed Mar 22 19:20:30 2017 +0100
@@ -242,6 +242,7 @@
     heads = local.revs('heads(%ld)', probeset)
 
     rangelength = local.stablerange.rangelength
+    subranges = local.stablerange.subranges
     # size of slice ?
     heappop = heapq.heappop
     heappush = heapq.heappush
@@ -286,7 +287,7 @@
 
             while sliceme and 0 < needed:
                 _key, target = heappop(sliceme)
-                for new in target.subranges():
+                for new in subranges(local, target):
                     # XXX we could record hierarchy to optimise drop
                     if addentry(entry):
                         if 1 < len(entry):
@@ -313,7 +314,7 @@
             elif 1 == rangelength(local, entry):
                 missing.add(n(entry[0]))
             else:
-                for new in entry.subranges():
+                for new in subranges(local, entry):
                     addentry(new)
         assert nbsample == nbreplies
         querycount += 1