mirror of
https://github.com/facebook/sapling.git
synced 2025-01-07 14:10:42 +03:00
test-ancestor: add a test for ancestor
with ancestry within the initset
I was wondering if revisions in the initial set that are still ancestors of other elements in the initial set were yielded by `changelog.ancestors`. I now have my answer (they do) and Mercurial has a new test.
This commit is contained in:
parent
cb0b9120c1
commit
1f9120a498
@ -91,6 +91,10 @@ def test_lazyancestors():
|
||||
s = genlazyancestors([11, 13])
|
||||
printlazyancestors(s, [11, 13, 7, 9, 8, 3, 6, 4, 1, -1, 0])
|
||||
|
||||
# Standard with ancestry in the initial set (1 is ancestor of 3)
|
||||
s = genlazyancestors([1, 3])
|
||||
printlazyancestors(s, [1, -1, 0])
|
||||
|
||||
# Including revs
|
||||
s = genlazyancestors([11, 13], inclusive=True)
|
||||
printlazyancestors(s, [11, 13, 7, 9, 8, 3, 6, 4, 1, -1, 0])
|
||||
|
@ -38,6 +38,8 @@
|
||||
[]
|
||||
% lazy ancestor set for [11, 13], stoprev = 0, inclusive = False
|
||||
[7, 8, 3, 4, 1, 0]
|
||||
% lazy ancestor set for [1, 3], stoprev = 0, inclusive = False
|
||||
[1, 0]
|
||||
% lazy ancestor set for [11, 13], stoprev = 0, inclusive = True
|
||||
[11, 13, 7, 8, 3, 4, 1, 0]
|
||||
% lazy ancestor set for [11, 13], stoprev = 6, inclusive = False
|
||||
|
Loading…
Reference in New Issue
Block a user