changeset 39517:cc85ebb68ff9

snapshot: turn _refinedgroups into a coroutine We are now almost ready to start adding refining logic.
author Boris Feld <boris.feld@octobus.net>
date Fri, 07 Sep 2018 11:17:34 -0400
parents 51cec7fb672e
children 993d7e2c8b79
files mercurial/revlogutils/deltas.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py	Fri Sep 07 11:17:33 2018 -0400
+++ b/mercurial/revlogutils/deltas.py	Fri Sep 07 11:17:34 2018 -0400
@@ -589,7 +589,7 @@
     tested = set([nullrev])
     candidates = _refinedgroups(revlog, p1, p2, cachedelta)
     while True:
-        temptative = next(candidates)
+        temptative = candidates.send(good)
         if temptative is None:
             break
         group = []
@@ -618,8 +618,6 @@
             #      impacting performances. Some bounding or slicing mecanism
             #      would help to reduce this impact.
             good = yield tuple(group)
-        if good is not None:
-            break
     yield None
 
 def _findsnapshots(revlog, cache, start_rev):