##// END OF EJS Templates
test-ancestor: test iteration for lazyancestors...
Siddharth Agarwal -
r23329:c6cd4b8b default
parent child Browse files
Show More
@@ -77,7 +77,8 b' def genlazyancestors(revs, stoprev=0, in'
77 inclusive=inclusive)
77 inclusive=inclusive)
78
78
79 def printlazyancestors(s, l):
79 def printlazyancestors(s, l):
80 print [n for n in l if n in s]
80 print 'membership: %r' % [n for n in l if n in s]
81 print 'iteration: %r' % list(s)
81
82
82 def test_lazyancestors():
83 def test_lazyancestors():
83 # Empty revs
84 # Empty revs
@@ -35,14 +35,20 b''
35 % ancestors of [13] and not of [10, 11, 12]
35 % ancestors of [13] and not of [10, 11, 12]
36 [8, 13]
36 [8, 13]
37 % lazy ancestor set for [], stoprev = 0, inclusive = False
37 % lazy ancestor set for [], stoprev = 0, inclusive = False
38 []
38 membership: []
39 iteration: []
39 % lazy ancestor set for [11, 13], stoprev = 0, inclusive = False
40 % lazy ancestor set for [11, 13], stoprev = 0, inclusive = False
40 [7, 8, 3, 4, 1, 0]
41 membership: [7, 8, 3, 4, 1, 0]
42 iteration: [3, 7, 8, 1, 4, 0, 2]
41 % lazy ancestor set for [1, 3], stoprev = 0, inclusive = False
43 % lazy ancestor set for [1, 3], stoprev = 0, inclusive = False
42 [1, 0]
44 membership: [1, 0]
45 iteration: [0, 1]
43 % lazy ancestor set for [11, 13], stoprev = 0, inclusive = True
46 % lazy ancestor set for [11, 13], stoprev = 0, inclusive = True
44 [11, 13, 7, 8, 3, 4, 1, 0]
47 membership: [11, 13, 7, 8, 3, 4, 1, 0]
48 iteration: [11, 13, 3, 7, 8, 1, 4, 0, 2]
45 % lazy ancestor set for [11, 13], stoprev = 6, inclusive = False
49 % lazy ancestor set for [11, 13], stoprev = 6, inclusive = False
46 [7, 8]
50 membership: [7, 8]
51 iteration: [7, 8]
47 % lazy ancestor set for [11, 13], stoprev = 6, inclusive = True
52 % lazy ancestor set for [11, 13], stoprev = 6, inclusive = True
48 [11, 13, 7, 8]
53 membership: [11, 13, 7, 8]
54 iteration: [11, 13, 7, 8]
General Comments 0
You need to be logged in to leave comments. Login now