##// END OF EJS Templates
reachableroots: use baseset lazy sorting...
Pierre-Yves David -
r26061:be8a4e08 default
parent child Browse files
Show More
@@ -186,8 +186,10 b' class changelog(revlog.revlog):'
186 186 return self._nodecache
187 187
188 188 def reachableroots(self, minroot, heads, roots, includepath=False):
189 return revset.baseset(sorted(
190 self.index.reachableroots2(minroot, heads, roots, includepath)))
189 rroots = self.index.reachableroots2(minroot, heads, roots, includepath)
190 rroots = revset.baseset(rroots)
191 rroots.sort()
192 return rroots
191 193
192 194 def headrevs(self):
193 195 if self.filteredrevs:
@@ -96,9 +96,9 b' Test SEGV caused by bad revision passed '
96 96 > print inst
97 97 > EOF
98 98 good heads:
99 0: <baseset [0]>
100 1: <baseset [0]>
101 -1: <baseset []>
99 0: <baseset+ [0]>
100 1: <baseset+ [0]>
101 -1: <baseset+ []>
102 102 bad heads:
103 103 2: head out of range
104 104 10000: head out of range
@@ -106,14 +106,14 b' Test SEGV caused by bad revision passed '
106 106 -10000: head out of range
107 107 None: an integer is required
108 108 good roots:
109 0: <baseset [0]>
110 1: <baseset [1]>
111 -1: <baseset [-1]>
109 0: <baseset+ [0]>
110 1: <baseset+ [1]>
111 -1: <baseset+ [-1]>
112 112 out-of-range roots are ignored:
113 2: <baseset []>
114 10000: <baseset []>
115 -2: <baseset []>
116 -10000: <baseset []>
113 2: <baseset+ []>
114 10000: <baseset+ []>
115 -2: <baseset+ []>
116 -10000: <baseset+ []>
117 117 bad roots:
118 118 None: an integer is required
119 119
@@ -141,7 +141,7 b' trivial'
141 141 ('symbol', '3')
142 142 ('symbol', '6'))
143 143 * set:
144 <baseset [3, 5, 6]>
144 <baseset+ [3, 5, 6]>
145 145 3
146 146 5
147 147 6
@@ -991,7 +991,7 b' test that `or` operation skips duplicate'
991 991 ('symbol', '4')))
992 992 * set:
993 993 <addset
994 <baseset [5, 3, 1]>,
994 <baseset- [1, 3, 5]>,
995 995 <generatorset+>>
996 996 5
997 997 3
@@ -1014,7 +1014,7 b' test that `or` operation skips duplicate'
1014 1014 * set:
1015 1015 <addset+
1016 1016 <generatorset+>,
1017 <baseset [5, 3, 1]>>
1017 <baseset- [1, 3, 5]>>
1018 1018 0
1019 1019 1
1020 1020 2
General Comments 0
You need to be logged in to leave comments. Login now