diff --git a/mercurial/ancestor.py b/mercurial/ancestor.py --- a/mercurial/ancestor.py +++ b/mercurial/ancestor.py @@ -273,7 +273,7 @@ class lazyancestors(object): Result does not include the null revision.""" self._parentrevs = pfunc - self._initrevs = revs + self._initrevs = revs = [r for r in revs if r >= stoprev] self._stoprev = stoprev self._inclusive = inclusive diff --git a/tests/test-ancestor.py.out b/tests/test-ancestor.py.out --- a/tests/test-ancestor.py.out +++ b/tests/test-ancestor.py.out @@ -20,5 +20,5 @@ iteration: [13, 11, 8, 7] membership: [11, 13] iteration: [13, 11] % lazy ancestor set for [11, 13], stoprev = 12, inclusive = True -membership: [11, 13] +membership: [13] iteration: [13]