changeset 39581:68ce242c8b4b

ancestor: remove extra generator from lazyancestors.__iter__()
author Yuya Nishihara <yuya@tcha.org>
date Mon, 10 Sep 2018 20:57:18 +0900
parents a64a965b3610
children 28f974d83c0a
files mercurial/ancestor.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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."""