diff tests/test-ancestor.py @ 22355:731b2a90983b

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 30 Aug 2014 11:39:15 +0200
parents 7731a2281cf0
children 3a7d9c0c57a5
line wrap: on
line diff
--- a/tests/test-ancestor.py	Tue Aug 26 12:47:41 2014 +0200
+++ b/tests/test-ancestor.py	Sat Aug 30 11:39:15 2014 +0200
@@ -91,6 +91,10 @@
     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])