# HG changeset patch # User Yuya Nishihara # Date 2018-09-08 01:59:24 # Node ID 7eadc94078675a19066cf73ac2d25403b9551cae # Parent 431068d7e9db6b0f40c77d38c229970b21c289c9 ancestor: filter out initial revisions lower than stoprev 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]