Mercurial > evolve
comparison tests/test-stablerange.t @ 2082:3f787182509f
discovery: introduce "stable slicing" methods
We introduce new code that leverage the stable sorting to slices a graph in a
way "stable" accross repository. This should allow us to use theses slices for
obsolescence markers discovery.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 09 Mar 2017 22:57:41 -0800 |
parents | |
children | 778afb036245 |
comparison
equal
deleted
inserted
replaced
2081:010a8af416a0 | 2082:3f787182509f |
---|---|
1 Test for stable ordering capabilities | |
2 ===================================== | |
3 | |
4 $ . $TESTDIR/testlib/pythonpath.sh | |
5 | |
6 $ cat << EOF >> $HGRCPATH | |
7 > [extensions] | |
8 > hgext3rd.evolve = | |
9 > [ui] | |
10 > logtemplate = "{rev} {node|short} {desc} {tags}\n" | |
11 > EOF | |
12 | |
13 Simple linear test | |
14 ================== | |
15 | |
16 $ hg init repo_linear | |
17 $ cd repo_linear | |
18 $ hg debugbuilddag '.+6' | |
19 $ hg debugstablerange --rev 1 | |
20 rev node index size depth | |
21 1 66f7d451a68b 0 2 2 | |
22 0 1ea73414a91b 0 1 1 | |
23 1 66f7d451a68b 1 1 2 | |
24 $ hg debugstablerange --rev 1 > 1.range | |
25 | |
26 bigger subset reuse most of the previous one | |
27 | |
28 $ hg debugstablerange --rev 4 | |
29 rev node index size depth | |
30 4 bebd167eb94d 0 5 5 | |
31 3 2dc09a01254d 0 4 4 | |
32 3 2dc09a01254d 2 2 4 | |
33 1 66f7d451a68b 0 2 2 | |
34 2 01241442b3c2 2 1 3 | |
35 0 1ea73414a91b 0 1 1 | |
36 3 2dc09a01254d 3 1 4 | |
37 1 66f7d451a68b 1 1 2 | |
38 4 bebd167eb94d 4 1 5 | |
39 $ hg debugstablerange --rev 4 > 4.range | |
40 $ diff -u 1.range 4.range | |
41 --- 1.range * (glob) | |
42 +++ 4.range * (glob) | |
43 @@ -1,4 +1,10 @@ | |
44 rev node index size depth | |
45 + 4 bebd167eb94d 0 5 5 | |
46 + 3 2dc09a01254d 0 4 4 | |
47 + 3 2dc09a01254d 2 2 4 | |
48 1 66f7d451a68b 0 2 2 | |
49 + 2 01241442b3c2 2 1 3 | |
50 0 1ea73414a91b 0 1 1 | |
51 + 3 2dc09a01254d 3 1 4 | |
52 1 66f7d451a68b 1 1 2 | |
53 + 4 bebd167eb94d 4 1 5 | |
54 [1] | |
55 | |
56 Using a range not ending on 2**N boundary | |
57 we fall back on 2**N as much as possible | |
58 | |
59 $ hg debugstablerange --rev 5 | |
60 rev node index size depth | |
61 5 c8d03c1b5e94 0 6 6 | |
62 3 2dc09a01254d 0 4 4 | |
63 3 2dc09a01254d 2 2 4 | |
64 1 66f7d451a68b 0 2 2 | |
65 5 c8d03c1b5e94 4 2 6 | |
66 2 01241442b3c2 2 1 3 | |
67 0 1ea73414a91b 0 1 1 | |
68 3 2dc09a01254d 3 1 4 | |
69 1 66f7d451a68b 1 1 2 | |
70 4 bebd167eb94d 4 1 5 | |
71 5 c8d03c1b5e94 5 1 6 | |
72 $ hg debugstablerange --rev 5 > 5.range | |
73 $ diff -u 4.range 5.range | |
74 --- 4.range * (glob) | |
75 +++ 5.range * (glob) | |
76 @@ -1,10 +1,12 @@ | |
77 rev node index size depth | |
78 - 4 bebd167eb94d 0 5 5 | |
79 + 5 c8d03c1b5e94 0 6 6 | |
80 3 2dc09a01254d 0 4 4 | |
81 3 2dc09a01254d 2 2 4 | |
82 1 66f7d451a68b 0 2 2 | |
83 + 5 c8d03c1b5e94 4 2 6 | |
84 2 01241442b3c2 2 1 3 | |
85 0 1ea73414a91b 0 1 1 | |
86 3 2dc09a01254d 3 1 4 | |
87 1 66f7d451a68b 1 1 2 | |
88 4 bebd167eb94d 4 1 5 | |
89 + 5 c8d03c1b5e94 5 1 6 | |
90 [1] | |
91 | |
92 Even two unperfect range overlap a lot | |
93 | |
94 $ hg debugstablerange --rev tip | |
95 rev node index size depth | |
96 6 f69452c5b1af 0 7 7 | |
97 3 2dc09a01254d 0 4 4 | |
98 6 f69452c5b1af 4 3 7 | |
99 3 2dc09a01254d 2 2 4 | |
100 1 66f7d451a68b 0 2 2 | |
101 5 c8d03c1b5e94 4 2 6 | |
102 2 01241442b3c2 2 1 3 | |
103 0 1ea73414a91b 0 1 1 | |
104 3 2dc09a01254d 3 1 4 | |
105 1 66f7d451a68b 1 1 2 | |
106 4 bebd167eb94d 4 1 5 | |
107 5 c8d03c1b5e94 5 1 6 | |
108 6 f69452c5b1af 6 1 7 | |
109 $ hg debugstablerange --rev tip > tip.range | |
110 $ diff -u 5.range tip.range | |
111 --- 5.range * (glob) | |
112 +++ tip.range * (glob) | |
113 @@ -1,6 +1,7 @@ | |
114 rev node index size depth | |
115 - 5 c8d03c1b5e94 0 6 6 | |
116 + 6 f69452c5b1af 0 7 7 | |
117 3 2dc09a01254d 0 4 4 | |
118 + 6 f69452c5b1af 4 3 7 | |
119 3 2dc09a01254d 2 2 4 | |
120 1 66f7d451a68b 0 2 2 | |
121 5 c8d03c1b5e94 4 2 6 | |
122 @@ -10,3 +11,4 @@ | |
123 1 66f7d451a68b 1 1 2 | |
124 4 bebd167eb94d 4 1 5 | |
125 5 c8d03c1b5e94 5 1 6 | |
126 + 6 f69452c5b1af 6 1 7 | |
127 [1] | |
128 | |
129 $ cd .. | |
130 | |
131 Case with merge | |
132 =============== | |
133 | |
134 Simple case: branching is on a boundary | |
135 -------------------------------------------- | |
136 | |
137 $ hg init repo_merge_split_on_boundary | |
138 $ cd repo_merge_split_on_boundary | |
139 $ hg debugbuilddag '.:base | |
140 > +3:left | |
141 > <base+3:right | |
142 > <left/right:merge | |
143 > +2:head | |
144 > ' | |
145 $ hg log -G | |
146 o 9 0338daf18215 r9 head tip | |
147 | | |
148 o 8 71b32fcf3f71 r8 | |
149 | | |
150 o 7 5f18015f9110 r7 merge | |
151 |\ | |
152 | o 6 a2f58e9c1e56 r6 right | |
153 | | | |
154 | o 5 3a367db1fabc r5 | |
155 | | | |
156 | o 4 e7bd5218ca15 r4 | |
157 | | | |
158 o | 3 2dc09a01254d r3 left | |
159 | | | |
160 o | 2 01241442b3c2 r2 | |
161 | | | |
162 o | 1 66f7d451a68b r1 | |
163 |/ | |
164 o 0 1ea73414a91b r0 base | |
165 | |
166 | |
167 Each of the linear branch reuse range internally | |
168 | |
169 (left branch) | |
170 | |
171 $ hg debugstablerange --rev 'left~2' | |
172 rev node index size depth | |
173 1 66f7d451a68b 0 2 2 | |
174 0 1ea73414a91b 0 1 1 | |
175 1 66f7d451a68b 1 1 2 | |
176 $ hg debugstablerange --rev 'left~2' > left-2.range | |
177 $ hg debugstablerange --rev left | |
178 rev node index size depth | |
179 3 2dc09a01254d 0 4 4 | |
180 3 2dc09a01254d 2 2 4 | |
181 1 66f7d451a68b 0 2 2 | |
182 2 01241442b3c2 2 1 3 | |
183 0 1ea73414a91b 0 1 1 | |
184 3 2dc09a01254d 3 1 4 | |
185 1 66f7d451a68b 1 1 2 | |
186 $ hg debugstablerange --rev 'left' > left.range | |
187 $ diff -u left-2.range left.range | |
188 --- left-2.range * (glob) | |
189 +++ left.range * (glob) | |
190 @@ -1,4 +1,8 @@ | |
191 rev node index size depth | |
192 + 3 2dc09a01254d 0 4 4 | |
193 + 3 2dc09a01254d 2 2 4 | |
194 1 66f7d451a68b 0 2 2 | |
195 + 2 01241442b3c2 2 1 3 | |
196 0 1ea73414a91b 0 1 1 | |
197 + 3 2dc09a01254d 3 1 4 | |
198 1 66f7d451a68b 1 1 2 | |
199 [1] | |
200 | |
201 (right branch) | |
202 | |
203 $ hg debugstablerange --rev right~2 | |
204 rev node index size depth | |
205 4 e7bd5218ca15 0 2 2 | |
206 0 1ea73414a91b 0 1 1 | |
207 4 e7bd5218ca15 1 1 2 | |
208 $ hg debugstablerange --rev 'right~2' > right-2.range | |
209 $ hg debugstablerange --rev right | |
210 rev node index size depth | |
211 6 a2f58e9c1e56 0 4 4 | |
212 6 a2f58e9c1e56 2 2 4 | |
213 4 e7bd5218ca15 0 2 2 | |
214 0 1ea73414a91b 0 1 1 | |
215 5 3a367db1fabc 2 1 3 | |
216 6 a2f58e9c1e56 3 1 4 | |
217 4 e7bd5218ca15 1 1 2 | |
218 $ hg debugstablerange --rev 'right' > right.range | |
219 $ diff -u right-2.range right.range | |
220 --- right-2.range * (glob) | |
221 +++ right.range * (glob) | |
222 @@ -1,4 +1,8 @@ | |
223 rev node index size depth | |
224 + 6 a2f58e9c1e56 0 4 4 | |
225 + 6 a2f58e9c1e56 2 2 4 | |
226 4 e7bd5218ca15 0 2 2 | |
227 0 1ea73414a91b 0 1 1 | |
228 + 5 3a367db1fabc 2 1 3 | |
229 + 6 a2f58e9c1e56 3 1 4 | |
230 4 e7bd5218ca15 1 1 2 | |
231 [1] | |
232 | |
233 The merge reuse as much of the slicing created for one of the branch | |
234 | |
235 $ hg debugstablerange --rev merge | |
236 rev node index size depth | |
237 7 5f18015f9110 0 8 8 | |
238 3 2dc09a01254d 0 4 4 | |
239 7 5f18015f9110 4 4 8 | |
240 3 2dc09a01254d 2 2 4 | |
241 5 3a367db1fabc 1 2 3 | |
242 7 5f18015f9110 6 2 8 | |
243 1 66f7d451a68b 0 2 2 | |
244 2 01241442b3c2 2 1 3 | |
245 0 1ea73414a91b 0 1 1 | |
246 3 2dc09a01254d 3 1 4 | |
247 5 3a367db1fabc 2 1 3 | |
248 7 5f18015f9110 7 1 8 | |
249 1 66f7d451a68b 1 1 2 | |
250 6 a2f58e9c1e56 3 1 4 | |
251 4 e7bd5218ca15 1 1 2 | |
252 $ hg debugstablerange --rev 'merge' > merge.range | |
253 $ diff -u left.range merge.range | |
254 --- left.range * (glob) | |
255 +++ merge.range * (glob) | |
256 @@ -1,8 +1,16 @@ | |
257 rev node index size depth | |
258 + 7 5f18015f9110 0 8 8 | |
259 3 2dc09a01254d 0 4 4 | |
260 + 7 5f18015f9110 4 4 8 | |
261 3 2dc09a01254d 2 2 4 | |
262 + 5 3a367db1fabc 1 2 3 | |
263 + 7 5f18015f9110 6 2 8 | |
264 1 66f7d451a68b 0 2 2 | |
265 2 01241442b3c2 2 1 3 | |
266 0 1ea73414a91b 0 1 1 | |
267 3 2dc09a01254d 3 1 4 | |
268 + 5 3a367db1fabc 2 1 3 | |
269 + 7 5f18015f9110 7 1 8 | |
270 1 66f7d451a68b 1 1 2 | |
271 + 6 a2f58e9c1e56 3 1 4 | |
272 + 4 e7bd5218ca15 1 1 2 | |
273 [1] | |
274 $ diff -u right.range merge.range | |
275 --- right.range * (glob) | |
276 +++ merge.range * (glob) | |
277 @@ -1,8 +1,16 @@ | |
278 rev node index size depth | |
279 - 6 a2f58e9c1e56 0 4 4 | |
280 - 6 a2f58e9c1e56 2 2 4 | |
281 - 4 e7bd5218ca15 0 2 2 | |
282 + 7 5f18015f9110 0 8 8 | |
283 + 3 2dc09a01254d 0 4 4 | |
284 + 7 5f18015f9110 4 4 8 | |
285 + 3 2dc09a01254d 2 2 4 | |
286 + 5 3a367db1fabc 1 2 3 | |
287 + 7 5f18015f9110 6 2 8 | |
288 + 1 66f7d451a68b 0 2 2 | |
289 + 2 01241442b3c2 2 1 3 | |
290 0 1ea73414a91b 0 1 1 | |
291 + 3 2dc09a01254d 3 1 4 | |
292 5 3a367db1fabc 2 1 3 | |
293 + 7 5f18015f9110 7 1 8 | |
294 + 1 66f7d451a68b 1 1 2 | |
295 6 a2f58e9c1e56 3 1 4 | |
296 4 e7bd5218ca15 1 1 2 | |
297 [1] | |
298 $ cd .. | |
299 | |
300 slice create multiple heads | |
301 --------------------------- | |
302 | |
303 $ hg init repo_merge_split_heads | |
304 $ cd repo_merge_split_heads | |
305 $ hg debugbuilddag '.:base | |
306 > +4:left | |
307 > <base+5:right | |
308 > <left/right:merge | |
309 > +2:head | |
310 > ' | |
311 $ hg debugbuilddag '.:base | |
312 > +3:left | |
313 > <base+3:right | |
314 > <left/right:merge | |
315 > +2:head | |
316 > ' | |
317 abort: repository is not empty | |
318 [255] | |
319 $ hg log -G | |
320 o 12 e6b8d5b46647 r12 head tip | |
321 | | |
322 o 11 485383494a89 r11 | |
323 | | |
324 o 10 8aca7f8c9bd2 r10 merge | |
325 |\ | |
326 | o 9 f4b7da68b467 r9 right | |
327 | | | |
328 | o 8 857477a9aebb r8 | |
329 | | | |
330 | o 7 42b07e8da27d r7 | |
331 | | | |
332 | o 6 b9bc20507e0b r6 | |
333 | | | |
334 | o 5 de561312eff4 r5 | |
335 | | | |
336 o | 4 bebd167eb94d r4 left | |
337 | | | |
338 o | 3 2dc09a01254d r3 | |
339 | | | |
340 o | 2 01241442b3c2 r2 | |
341 | | | |
342 o | 1 66f7d451a68b r1 | |
343 |/ | |
344 o 0 1ea73414a91b r0 base | |
345 | |
346 | |
347 Each of the linear branch reuse range internally | |
348 | |
349 (left branch) | |
350 | |
351 $ hg debugstablerange --rev 'left~2' | |
352 rev node index size depth | |
353 2 01241442b3c2 0 3 3 | |
354 1 66f7d451a68b 0 2 2 | |
355 2 01241442b3c2 2 1 3 | |
356 0 1ea73414a91b 0 1 1 | |
357 1 66f7d451a68b 1 1 2 | |
358 $ hg debugstablerange --rev 'left~2' > left-2.range | |
359 $ hg debugstablerange --rev left | |
360 rev node index size depth | |
361 4 bebd167eb94d 0 5 5 | |
362 3 2dc09a01254d 0 4 4 | |
363 3 2dc09a01254d 2 2 4 | |
364 1 66f7d451a68b 0 2 2 | |
365 2 01241442b3c2 2 1 3 | |
366 0 1ea73414a91b 0 1 1 | |
367 3 2dc09a01254d 3 1 4 | |
368 1 66f7d451a68b 1 1 2 | |
369 4 bebd167eb94d 4 1 5 | |
370 $ hg debugstablerange --rev 'left' > left.range | |
371 $ diff -u left-2.range left.range | |
372 --- left-2.range * (glob) | |
373 +++ left.range * (glob) | |
374 @@ -1,6 +1,10 @@ | |
375 rev node index size depth | |
376 - 2 01241442b3c2 0 3 3 | |
377 + 4 bebd167eb94d 0 5 5 | |
378 + 3 2dc09a01254d 0 4 4 | |
379 + 3 2dc09a01254d 2 2 4 | |
380 1 66f7d451a68b 0 2 2 | |
381 2 01241442b3c2 2 1 3 | |
382 0 1ea73414a91b 0 1 1 | |
383 + 3 2dc09a01254d 3 1 4 | |
384 1 66f7d451a68b 1 1 2 | |
385 + 4 bebd167eb94d 4 1 5 | |
386 [1] | |
387 | |
388 (right branch) | |
389 | |
390 $ hg debugstablerange --rev right~2 | |
391 rev node index size depth | |
392 7 42b07e8da27d 0 4 4 | |
393 7 42b07e8da27d 2 2 4 | |
394 5 de561312eff4 0 2 2 | |
395 0 1ea73414a91b 0 1 1 | |
396 7 42b07e8da27d 3 1 4 | |
397 6 b9bc20507e0b 2 1 3 | |
398 5 de561312eff4 1 1 2 | |
399 $ hg debugstablerange --rev 'right~2' > right-2.range | |
400 $ hg debugstablerange --rev right | |
401 rev node index size depth | |
402 9 f4b7da68b467 0 6 6 | |
403 7 42b07e8da27d 0 4 4 | |
404 7 42b07e8da27d 2 2 4 | |
405 5 de561312eff4 0 2 2 | |
406 9 f4b7da68b467 4 2 6 | |
407 0 1ea73414a91b 0 1 1 | |
408 7 42b07e8da27d 3 1 4 | |
409 8 857477a9aebb 4 1 5 | |
410 6 b9bc20507e0b 2 1 3 | |
411 5 de561312eff4 1 1 2 | |
412 9 f4b7da68b467 5 1 6 | |
413 $ hg debugstablerange --rev 'right' > right.range | |
414 $ diff -u right-2.range right.range | |
415 --- right-2.range * (glob) | |
416 +++ right.range * (glob) | |
417 @@ -1,8 +1,12 @@ | |
418 rev node index size depth | |
419 + 9 f4b7da68b467 0 6 6 | |
420 7 42b07e8da27d 0 4 4 | |
421 7 42b07e8da27d 2 2 4 | |
422 5 de561312eff4 0 2 2 | |
423 + 9 f4b7da68b467 4 2 6 | |
424 0 1ea73414a91b 0 1 1 | |
425 7 42b07e8da27d 3 1 4 | |
426 + 8 857477a9aebb 4 1 5 | |
427 6 b9bc20507e0b 2 1 3 | |
428 5 de561312eff4 1 1 2 | |
429 + 9 f4b7da68b467 5 1 6 | |
430 [1] | |
431 | |
432 In this case, the bottom of the split will have multiple heads, | |
433 | |
434 So we'll create more than 1 subrange out of it. | |
435 | |
436 We are still able to reuse one of the branch however | |
437 | |
438 $ hg debugstablerange --rev merge | |
439 rev node index size depth | |
440 10 8aca7f8c9bd2 0 11 11 | |
441 4 bebd167eb94d 0 5 5 | |
442 3 2dc09a01254d 0 4 4 | |
443 7 42b07e8da27d 0 4 4 | |
444 10 8aca7f8c9bd2 8 3 11 | |
445 3 2dc09a01254d 2 2 4 | |
446 7 42b07e8da27d 2 2 4 | |
447 1 66f7d451a68b 0 2 2 | |
448 5 de561312eff4 0 2 2 | |
449 9 f4b7da68b467 4 2 6 | |
450 2 01241442b3c2 2 1 3 | |
451 0 1ea73414a91b 0 1 1 | |
452 3 2dc09a01254d 3 1 4 | |
453 7 42b07e8da27d 3 1 4 | |
454 1 66f7d451a68b 1 1 2 | |
455 8 857477a9aebb 4 1 5 | |
456 10 8aca7f8c9bd2 10 1 11 | |
457 6 b9bc20507e0b 2 1 3 | |
458 4 bebd167eb94d 4 1 5 | |
459 5 de561312eff4 1 1 2 | |
460 9 f4b7da68b467 5 1 6 | |
461 $ hg debugstablerange --rev 'merge' > merge.range | |
462 $ diff -u left.range merge.range | |
463 --- left.range * (glob) | |
464 +++ merge.range * (glob) | |
465 @@ -1,10 +1,22 @@ | |
466 rev node index size depth | |
467 + 10 8aca7f8c9bd2 0 11 11 | |
468 4 bebd167eb94d 0 5 5 | |
469 3 2dc09a01254d 0 4 4 | |
470 + 7 42b07e8da27d 0 4 4 | |
471 + 10 8aca7f8c9bd2 8 3 11 | |
472 3 2dc09a01254d 2 2 4 | |
473 + 7 42b07e8da27d 2 2 4 | |
474 1 66f7d451a68b 0 2 2 | |
475 + 5 de561312eff4 0 2 2 | |
476 + 9 f4b7da68b467 4 2 6 | |
477 2 01241442b3c2 2 1 3 | |
478 0 1ea73414a91b 0 1 1 | |
479 3 2dc09a01254d 3 1 4 | |
480 + 7 42b07e8da27d 3 1 4 | |
481 1 66f7d451a68b 1 1 2 | |
482 + 8 857477a9aebb 4 1 5 | |
483 + 10 8aca7f8c9bd2 10 1 11 | |
484 + 6 b9bc20507e0b 2 1 3 | |
485 4 bebd167eb94d 4 1 5 | |
486 + 5 de561312eff4 1 1 2 | |
487 + 9 f4b7da68b467 5 1 6 | |
488 [1] | |
489 $ diff -u right.range merge.range | |
490 --- right.range * (glob) | |
491 +++ merge.range * (glob) | |
492 @@ -1,12 +1,22 @@ | |
493 rev node index size depth | |
494 - 9 f4b7da68b467 0 6 6 | |
495 + 10 8aca7f8c9bd2 0 11 11 | |
496 + 4 bebd167eb94d 0 5 5 | |
497 + 3 2dc09a01254d 0 4 4 | |
498 7 42b07e8da27d 0 4 4 | |
499 + 10 8aca7f8c9bd2 8 3 11 | |
500 + 3 2dc09a01254d 2 2 4 | |
501 7 42b07e8da27d 2 2 4 | |
502 + 1 66f7d451a68b 0 2 2 | |
503 5 de561312eff4 0 2 2 | |
504 9 f4b7da68b467 4 2 6 | |
505 + 2 01241442b3c2 2 1 3 | |
506 0 1ea73414a91b 0 1 1 | |
507 + 3 2dc09a01254d 3 1 4 | |
508 7 42b07e8da27d 3 1 4 | |
509 + 1 66f7d451a68b 1 1 2 | |
510 8 857477a9aebb 4 1 5 | |
511 + 10 8aca7f8c9bd2 10 1 11 | |
512 6 b9bc20507e0b 2 1 3 | |
513 + 4 bebd167eb94d 4 1 5 | |
514 5 de561312eff4 1 1 2 | |
515 9 f4b7da68b467 5 1 6 | |
516 [1] | |
517 | |
518 Range above the merge, reuse subrange from the merge | |
519 | |
520 $ hg debugstablerange --rev tip | |
521 rev node index size depth | |
522 12 e6b8d5b46647 0 13 13 | |
523 4 bebd167eb94d 0 5 5 | |
524 12 e6b8d5b46647 8 5 13 | |
525 3 2dc09a01254d 0 4 4 | |
526 7 42b07e8da27d 0 4 4 | |
527 11 485383494a89 8 4 12 | |
528 3 2dc09a01254d 2 2 4 | |
529 7 42b07e8da27d 2 2 4 | |
530 11 485383494a89 10 2 12 | |
531 1 66f7d451a68b 0 2 2 | |
532 5 de561312eff4 0 2 2 | |
533 9 f4b7da68b467 4 2 6 | |
534 2 01241442b3c2 2 1 3 | |
535 0 1ea73414a91b 0 1 1 | |
536 3 2dc09a01254d 3 1 4 | |
537 7 42b07e8da27d 3 1 4 | |
538 11 485383494a89 11 1 12 | |
539 1 66f7d451a68b 1 1 2 | |
540 8 857477a9aebb 4 1 5 | |
541 10 8aca7f8c9bd2 10 1 11 | |
542 6 b9bc20507e0b 2 1 3 | |
543 4 bebd167eb94d 4 1 5 | |
544 5 de561312eff4 1 1 2 | |
545 12 e6b8d5b46647 12 1 13 | |
546 9 f4b7da68b467 5 1 6 | |
547 $ hg debugstablerange --rev 'tip' > tip.range | |
548 $ diff -u merge.range tip.range | |
549 --- merge.range * (glob) | |
550 +++ tip.range * (glob) | |
551 @@ -1,11 +1,13 @@ | |
552 rev node index size depth | |
553 - 10 8aca7f8c9bd2 0 11 11 | |
554 + 12 e6b8d5b46647 0 13 13 | |
555 4 bebd167eb94d 0 5 5 | |
556 + 12 e6b8d5b46647 8 5 13 | |
557 3 2dc09a01254d 0 4 4 | |
558 7 42b07e8da27d 0 4 4 | |
559 - 10 8aca7f8c9bd2 8 3 11 | |
560 + 11 485383494a89 8 4 12 | |
561 3 2dc09a01254d 2 2 4 | |
562 7 42b07e8da27d 2 2 4 | |
563 + 11 485383494a89 10 2 12 | |
564 1 66f7d451a68b 0 2 2 | |
565 5 de561312eff4 0 2 2 | |
566 9 f4b7da68b467 4 2 6 | |
567 @@ -13,10 +15,12 @@ | |
568 0 1ea73414a91b 0 1 1 | |
569 3 2dc09a01254d 3 1 4 | |
570 7 42b07e8da27d 3 1 4 | |
571 + 11 485383494a89 11 1 12 | |
572 1 66f7d451a68b 1 1 2 | |
573 8 857477a9aebb 4 1 5 | |
574 10 8aca7f8c9bd2 10 1 11 | |
575 6 b9bc20507e0b 2 1 3 | |
576 4 bebd167eb94d 4 1 5 | |
577 5 de561312eff4 1 1 2 | |
578 + 12 e6b8d5b46647 12 1 13 | |
579 9 f4b7da68b467 5 1 6 | |
580 [1] | |
581 | |
582 $ cd .. | |
583 | |
584 Tests range with criss cross merge in the graph | |
585 =============================================== | |
586 | |
587 $ hg init repo_criss_cross | |
588 $ cd repo_criss_cross | |
589 $ hg debugbuilddag ' | |
590 > ..:g # 2 nodes, tagged "g" | |
591 > <2.:h # another node base one -2 -> 0, tagged "h" | |
592 > *1/2:m # merge -1 and -2 (1, 2), tagged "m" | |
593 > <2+2:i # 2 nodes based on -2, tag head as "i" | |
594 > .:c # 1 node tagged "c" | |
595 > <m+3:a # 3 nodes base on the "m" tag | |
596 > <2.:b # 1 node based on -2; tagged "b" | |
597 > <m+2:d # 2 nodes from "m" tagged "d" | |
598 > <2.:e # 1 node based on -2, tagged "e" | |
599 > <m+1:f # 1 node based on "m" tagged "f" | |
600 > <i/f # merge "i" and "f" | |
601 > ' | |
602 $ hg log -G | |
603 o 15 1d8d22637c2d r15 tip | |
604 |\ | |
605 | o 14 43227190fef8 r14 f | |
606 | | | |
607 | | o 13 b4594d867745 r13 e | |
608 | | | | |
609 | | | o 12 e46a4836065c r12 d | |
610 | | |/ | |
611 | | o 11 bab5d5bf48bd r11 | |
612 | |/ | |
613 | | o 10 ff43616e5d0f r10 b | |
614 | | | | |
615 | | | o 9 dcbb326fdec2 r9 a | |
616 | | |/ | |
617 | | o 8 d62d843c9a01 r8 | |
618 | | | | |
619 | | o 7 e7d9710d9fc6 r7 | |
620 | |/ | |
621 +---o 6 2702dd0c91e7 r6 c | |
622 | | | |
623 o | 5 f0f3ef9a6cd5 r5 i | |
624 | | | |
625 o | 4 4c748ffd1a46 r4 | |
626 | | | |
627 | o 3 2b6d669947cd r3 m | |
628 |/| | |
629 o | 2 fa942426a6fd r2 h | |
630 | | | |
631 | o 1 66f7d451a68b r1 g | |
632 |/ | |
633 o 0 1ea73414a91b r0 | |
634 | |
635 $ hg debugstablerange --rev 'head()' | |
636 rev node index size depth | |
637 15 1d8d22637c2d 0 8 8 | |
638 9 dcbb326fdec2 0 7 7 | |
639 10 ff43616e5d0f 0 7 7 | |
640 13 b4594d867745 0 6 6 | |
641 12 e46a4836065c 0 6 6 | |
642 6 2702dd0c91e7 0 5 5 | |
643 15 1d8d22637c2d 4 4 8 | |
644 3 2b6d669947cd 0 4 4 | |
645 5 f0f3ef9a6cd5 0 4 4 | |
646 9 dcbb326fdec2 4 3 7 | |
647 10 ff43616e5d0f 4 3 7 | |
648 15 1d8d22637c2d 6 2 8 | |
649 3 2b6d669947cd 2 2 4 | |
650 1 66f7d451a68b 0 2 2 | |
651 13 b4594d867745 4 2 6 | |
652 8 d62d843c9a01 4 2 6 | |
653 12 e46a4836065c 4 2 6 | |
654 5 f0f3ef9a6cd5 2 2 4 | |
655 2 fa942426a6fd 0 2 2 | |
656 15 1d8d22637c2d 7 1 8 | |
657 0 1ea73414a91b 0 1 1 | |
658 6 2702dd0c91e7 4 1 5 | |
659 3 2b6d669947cd 3 1 4 | |
660 14 43227190fef8 4 1 5 | |
661 4 4c748ffd1a46 2 1 3 | |
662 1 66f7d451a68b 1 1 2 | |
663 13 b4594d867745 5 1 6 | |
664 11 bab5d5bf48bd 4 1 5 | |
665 8 d62d843c9a01 5 1 6 | |
666 9 dcbb326fdec2 6 1 7 | |
667 12 e46a4836065c 5 1 6 | |
668 7 e7d9710d9fc6 4 1 5 | |
669 5 f0f3ef9a6cd5 3 1 4 | |
670 2 fa942426a6fd 1 1 2 | |
671 10 ff43616e5d0f 6 1 7 | |
672 $ cd .. |