changeset 2203:8a2e1f6e5443

findmissingrange: properly queue new subrange for slicing The previous code was buggy and used the wrong variable leading to no extra slicing being performed to file the sample at the requested size.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 23 Mar 2017 10:07:21 +0100
parents 5f8a2604bb2b
children 61a8b51348a1
files hgext3rd/evolve/obsdiscovery.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obsdiscovery.py	Thu Mar 23 10:06:20 2017 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py	Thu Mar 23 10:07:21 2017 +0100
@@ -289,9 +289,9 @@
                 _key, target = heappop(sliceme)
                 for new in subranges(local, target):
                     # XXX we could record hierarchy to optimise drop
-                    if addentry(entry):
-                        if 1 < len(entry):
-                            heappush(sliceme, (-rangelength(local, entry), entry))
+                    if addentry(new):
+                        if 1 < len(new):
+                            heappush(sliceme, (-rangelength(local, new), new))
                         needed -= 1
                         if needed <= 0:
                             break