--- a/mercurial/ancestor.py Sat Sep 08 10:48:42 2018 +0900
+++ b/mercurial/ancestor.py Sat Sep 08 10:59:24 2018 +0900
@@ -273,7 +273,7 @@
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
--- a/tests/test-ancestor.py.out Sat Sep 08 10:48:42 2018 +0900
+++ b/tests/test-ancestor.py.out Sat Sep 08 10:59:24 2018 +0900
@@ -20,5 +20,5 @@
membership: [11, 13]
iteration: [13, 11]
% lazy ancestor set for [11, 13], stoprev = 12, inclusive = True
-membership: [11, 13]
+membership: [13]
iteration: [13]