snapshot: turn _refinedgroups into a coroutine
We are now almost ready to start adding refining logic.
--- 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):