hgext3rd/evolve/obsdiscovery.py
changeset 2203 8a2e1f6e5443
parent 2202 5f8a2604bb2b
child 2228 3b18440cca74
equal deleted inserted replaced
2202:5f8a2604bb2b 2203:8a2e1f6e5443
   287 
   287 
   288             while sliceme and 0 < needed:
   288             while sliceme and 0 < needed:
   289                 _key, target = heappop(sliceme)
   289                 _key, target = heappop(sliceme)
   290                 for new in subranges(local, target):
   290                 for new in subranges(local, target):
   291                     # XXX we could record hierarchy to optimise drop
   291                     # XXX we could record hierarchy to optimise drop
   292                     if addentry(entry):
   292                     if addentry(new):
   293                         if 1 < len(entry):
   293                         if 1 < len(new):
   294                             heappush(sliceme, (-rangelength(local, entry), entry))
   294                             heappush(sliceme, (-rangelength(local, new), new))
   295                         needed -= 1
   295                         needed -= 1
   296                         if needed <= 0:
   296                         if needed <= 0:
   297                             break
   297                             break
   298 
   298 
   299         # no longer the first interation
   299         # no longer the first interation