# HG changeset patch # User Yuya Nishihara # Date 2018-09-10 11:57:18 # Node ID 68ce242c8b4b938077ec3b378fd9270fba3461a7 # Parent a64a965b361006f19e854e07f4d00a6558e23414 ancestor: remove extra generator from lazyancestors.__iter__() diff --git a/mercurial/ancestor.py b/mercurial/ancestor.py --- a/mercurial/ancestor.py +++ b/mercurial/ancestor.py @@ -348,9 +348,8 @@ class lazyancestors(object): 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."""