ancestor: remove extra generator from lazyancestors.__iter__()
authorYuya Nishihara <yuya@tcha.org>
Mon, 10 Sep 2018 20:57:18 +0900
changeset 39581 68ce242c8b4b
parent 39580 a64a965b3610
child 39582 28f974d83c0a
ancestor: remove extra generator from lazyancestors.__iter__()
mercurial/ancestor.py
--- a/mercurial/ancestor.py	Wed Sep 12 11:24:51 2018 -0700
+++ b/mercurial/ancestor.py	Mon Sep 10 20:57:18 2018 +0900
@@ -348,9 +348,8 @@
 
         If inclusive is True, the source revisions are also yielded. The
         reverse revision number order is still enforced."""
-        for rev in _lazyancestorsiter(self._parentrevs, self._initrevs,
-                                      self._stoprev, self._inclusive):
-            yield rev
+        return _lazyancestorsiter(self._parentrevs, self._initrevs,
+                                  self._stoprev, self._inclusive)
 
     def __contains__(self, target):
         """Test whether target is an ancestor of self._initrevs."""