# HG changeset patch # User Pierre-Yves David # Date 1490206830 -3600 # Node ID 71c518470e2cb4199cebaac7f368e02a8e670169 # Parent 53352bf5b7fcac15dec7dd54927fe7fbed6998a4 stablerange: use subranges from the main class in findrangemissing This is the last method used on the class. diff --git a/hgext3rd/evolve/obsdiscovery.py b/hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py +++ b/hgext3rd/evolve/obsdiscovery.py @@ -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