diff tests/test-revlog-ancestry.py @ 18081:f88c60e740a1

revlog.ancestors: add support for including revs This is in preparation for an upcoming refactoring. This also fixes a bug in incancestors, where if an element of revs was an ancestor of another it would be generated twice.
author Siddharth Agarwal <sid0@fb.com>
date Mon, 17 Dec 2012 15:13:51 -0800
parents eb88ed4269c5
children 43c00ca887d1
line wrap: on
line diff
--- a/tests/test-revlog-ancestry.py	Fri Dec 14 10:23:18 2012 -0800
+++ b/tests/test-revlog-ancestry.py	Mon Dec 17 15:13:51 2012 -0800
@@ -62,6 +62,14 @@
     for r in repo.changelog.ancestors([7], 6):
         print r,
 
+    print '\nAncestors of 7, including revs'
+    for r in repo.changelog.ancestors([7], inclusive=True):
+        print r,
+
+    print '\nAncestors of 7, 5 and 3, including revs'
+    for r in repo.changelog.ancestors([7, 5, 3], inclusive=True):
+        print r,
+
     # Descendants
     print '\n\nDescendants of 5'
     for r in repo.changelog.descendants([5]):