Mercurial > evolve
comparison tests/test-stablesort-branchpoint.t @ 3254:00e20077bccf
stablesort: introduce a "mergepoint" method
The mergepoint method decide order from merge. This allow to directly reuse a
the full sort of one of the parent, and should simplify caching.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 25 Nov 2017 04:09:17 -0500 |
parents | tests/test-stablesort.t@543708c3f754 |
children | 064738ae1588 |
comparison
equal
deleted
inserted
replaced
3253:8dcb9e929a57 | 3254:00e20077bccf |
---|---|
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 > [alias] | |
12 > showsort = debugstablesort --template="{node|short}\n" --method branchpoint | |
13 > EOF | |
14 | |
15 | |
16 | |
17 $ checktopo () { | |
18 > seen='null'; | |
19 > for node in `hg showsort --rev "$1"`; do | |
20 > echo "=== checking $node ==="; | |
21 > hg log --rev "($seen) and $node::"; | |
22 > seen="${seen}+${node}"; | |
23 > done; | |
24 > } | |
25 | |
26 $ cat << EOF >> random_rev.py | |
27 > import random | |
28 > import sys | |
29 > | |
30 > loop = int(sys.argv[1]) | |
31 > var = int(sys.argv[2]) | |
32 > for x in range(loop): | |
33 > print(x + random.randint(0, var)) | |
34 > EOF | |
35 | |
36 Basic tests | |
37 =========== | |
38 (no criss cross merge) | |
39 | |
40 Smoke tests | |
41 ----------- | |
42 | |
43 Starts with a "simple case" | |
44 | |
45 $ hg init repo_A | |
46 $ cd repo_A | |
47 $ hg debugbuilddag ' | |
48 > ..:g # 2 nodes, tagged "g" | |
49 > <2.:h # another node base one -2 -> 0, tagged "h" | |
50 > *1/2:m # merge -1 and -2 (1, 2), tagged "m" | |
51 > <2+2:i # 2 nodes based on -2, tag head as "i" | |
52 > .:c # 1 node tagged "c" | |
53 > <m+3:a # 3 nodes base on the "m" tag | |
54 > <2.:b # 1 node based on -2; tagged "b" | |
55 > <m+2:d # 2 nodes from "m" tagged "d" | |
56 > <2.:e # 1 node based on -2, tagged "e" | |
57 > <m+1:f # 1 node based on "m" tagged "f" | |
58 > <i/f # merge "i" and "f" | |
59 > ' | |
60 $ hg log -G | |
61 o 15 1d8d22637c2d r15 tip | |
62 |\ | |
63 | o 14 43227190fef8 r14 f | |
64 | | | |
65 | | o 13 b4594d867745 r13 e | |
66 | | | | |
67 | | | o 12 e46a4836065c r12 d | |
68 | | |/ | |
69 | | o 11 bab5d5bf48bd r11 | |
70 | |/ | |
71 | | o 10 ff43616e5d0f r10 b | |
72 | | | | |
73 | | | o 9 dcbb326fdec2 r9 a | |
74 | | |/ | |
75 | | o 8 d62d843c9a01 r8 | |
76 | | | | |
77 | | o 7 e7d9710d9fc6 r7 | |
78 | |/ | |
79 +---o 6 2702dd0c91e7 r6 c | |
80 | | | |
81 o | 5 f0f3ef9a6cd5 r5 i | |
82 | | | |
83 o | 4 4c748ffd1a46 r4 | |
84 | | | |
85 | o 3 2b6d669947cd r3 m | |
86 |/| | |
87 o | 2 fa942426a6fd r2 h | |
88 | | | |
89 | o 1 66f7d451a68b r1 g | |
90 |/ | |
91 o 0 1ea73414a91b r0 | |
92 | |
93 $ hg debugdepth -r 'all()' | |
94 1ea73414a91b 1 | |
95 66f7d451a68b 2 | |
96 fa942426a6fd 2 | |
97 2b6d669947cd 4 | |
98 4c748ffd1a46 3 | |
99 f0f3ef9a6cd5 4 | |
100 2702dd0c91e7 5 | |
101 e7d9710d9fc6 5 | |
102 d62d843c9a01 6 | |
103 dcbb326fdec2 7 | |
104 ff43616e5d0f 7 | |
105 bab5d5bf48bd 5 | |
106 e46a4836065c 6 | |
107 b4594d867745 6 | |
108 43227190fef8 5 | |
109 1d8d22637c2d 8 | |
110 $ hg showsort --rev 'all()' --traceback | |
111 1ea73414a91b | |
112 66f7d451a68b | |
113 fa942426a6fd | |
114 2b6d669947cd | |
115 43227190fef8 | |
116 bab5d5bf48bd | |
117 b4594d867745 | |
118 e46a4836065c | |
119 e7d9710d9fc6 | |
120 d62d843c9a01 | |
121 dcbb326fdec2 | |
122 ff43616e5d0f | |
123 4c748ffd1a46 | |
124 f0f3ef9a6cd5 | |
125 1d8d22637c2d | |
126 2702dd0c91e7 | |
127 | |
128 Verify the topological order | |
129 ---------------------------- | |
130 | |
131 Check we we did not issued a node before on ancestor | |
132 | |
133 output of log should be empty | |
134 | |
135 $ checktopo 'all()' | |
136 === checking 1ea73414a91b === | |
137 === checking 66f7d451a68b === | |
138 === checking fa942426a6fd === | |
139 === checking 2b6d669947cd === | |
140 === checking 43227190fef8 === | |
141 === checking bab5d5bf48bd === | |
142 === checking b4594d867745 === | |
143 === checking e46a4836065c === | |
144 === checking e7d9710d9fc6 === | |
145 === checking d62d843c9a01 === | |
146 === checking dcbb326fdec2 === | |
147 === checking ff43616e5d0f === | |
148 === checking 4c748ffd1a46 === | |
149 === checking f0f3ef9a6cd5 === | |
150 === checking 1d8d22637c2d === | |
151 === checking 2702dd0c91e7 === | |
152 | |
153 Check stability | |
154 =============== | |
155 | |
156 have repo with changesets in orders | |
157 | |
158 $ cd .. | |
159 $ hg -R repo_A log -G > A.log | |
160 $ hg clone repo_A repo_B --rev 5 | |
161 adding changesets | |
162 adding manifests | |
163 adding file changes | |
164 added 4 changesets with 0 changes to 0 files | |
165 new changesets 1ea73414a91b:f0f3ef9a6cd5 | |
166 updating to branch default | |
167 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
168 $ hg -R repo_B pull --rev 13 | |
169 pulling from $TESTTMP/repo_A (glob) | |
170 searching for changes | |
171 adding changesets | |
172 adding manifests | |
173 adding file changes | |
174 added 4 changesets with 0 changes to 0 files (+1 heads) | |
175 new changesets 66f7d451a68b:b4594d867745 | |
176 (run 'hg heads' to see heads, 'hg merge' to merge) | |
177 $ hg -R repo_B pull --rev 14 | |
178 pulling from $TESTTMP/repo_A (glob) | |
179 searching for changes | |
180 adding changesets | |
181 adding manifests | |
182 adding file changes | |
183 added 1 changesets with 0 changes to 0 files (+1 heads) | |
184 new changesets 43227190fef8 | |
185 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
186 $ hg -R repo_B pull | |
187 pulling from $TESTTMP/repo_A (glob) | |
188 searching for changes | |
189 adding changesets | |
190 adding manifests | |
191 adding file changes | |
192 added 7 changesets with 0 changes to 0 files (+3 heads) | |
193 new changesets 2702dd0c91e7:1d8d22637c2d | |
194 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
195 $ hg -R repo_B log -G | |
196 o 15 1d8d22637c2d r15 tip | |
197 |\ | |
198 | | o 14 e46a4836065c r12 | |
199 | | | | |
200 | | | o 13 ff43616e5d0f r10 | |
201 | | | | | |
202 | | | | o 12 dcbb326fdec2 r9 | |
203 | | | |/ | |
204 | | | o 11 d62d843c9a01 r8 | |
205 | | | | | |
206 | | | o 10 e7d9710d9fc6 r7 | |
207 | | | | | |
208 +-------o 9 2702dd0c91e7 r6 | |
209 | | | | | |
210 | o---+ 8 43227190fef8 r14 | |
211 | / / | |
212 | +---o 7 b4594d867745 r13 | |
213 | | | | |
214 | o | 6 bab5d5bf48bd r11 | |
215 | |/ | |
216 | o 5 2b6d669947cd r3 | |
217 | |\ | |
218 | | o 4 66f7d451a68b r1 | |
219 | | | | |
220 @ | | 3 f0f3ef9a6cd5 r5 | |
221 | | | | |
222 o | | 2 4c748ffd1a46 r4 | |
223 |/ / | |
224 o / 1 fa942426a6fd r2 | |
225 |/ | |
226 o 0 1ea73414a91b r0 | |
227 | |
228 $ hg -R repo_B debugdepth -r 'all()' | |
229 1ea73414a91b 1 | |
230 fa942426a6fd 2 | |
231 4c748ffd1a46 3 | |
232 f0f3ef9a6cd5 4 | |
233 66f7d451a68b 2 | |
234 2b6d669947cd 4 | |
235 bab5d5bf48bd 5 | |
236 b4594d867745 6 | |
237 43227190fef8 5 | |
238 2702dd0c91e7 5 | |
239 e7d9710d9fc6 5 | |
240 d62d843c9a01 6 | |
241 dcbb326fdec2 7 | |
242 ff43616e5d0f 7 | |
243 e46a4836065c 6 | |
244 1d8d22637c2d 8 | |
245 $ hg -R repo_B log -G > B.log | |
246 | |
247 $ hg clone repo_A repo_C --rev 10 | |
248 adding changesets | |
249 adding manifests | |
250 adding file changes | |
251 added 7 changesets with 0 changes to 0 files | |
252 new changesets 1ea73414a91b:ff43616e5d0f | |
253 updating to branch default | |
254 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
255 $ hg -R repo_C pull --rev 12 | |
256 pulling from $TESTTMP/repo_A (glob) | |
257 searching for changes | |
258 adding changesets | |
259 adding manifests | |
260 adding file changes | |
261 added 2 changesets with 0 changes to 0 files (+1 heads) | |
262 new changesets bab5d5bf48bd:e46a4836065c | |
263 (run 'hg heads' to see heads, 'hg merge' to merge) | |
264 $ hg -R repo_C pull --rev 15 | |
265 pulling from $TESTTMP/repo_A (glob) | |
266 searching for changes | |
267 adding changesets | |
268 adding manifests | |
269 adding file changes | |
270 added 4 changesets with 0 changes to 0 files (+1 heads) | |
271 new changesets 4c748ffd1a46:1d8d22637c2d | |
272 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
273 $ hg -R repo_C pull | |
274 pulling from $TESTTMP/repo_A (glob) | |
275 searching for changes | |
276 adding changesets | |
277 adding manifests | |
278 adding file changes | |
279 added 3 changesets with 0 changes to 0 files (+3 heads) | |
280 new changesets 2702dd0c91e7:b4594d867745 | |
281 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
282 $ hg -R repo_C log -G | |
283 o 15 b4594d867745 r13 tip | |
284 | | |
285 | o 14 dcbb326fdec2 r9 | |
286 | | | |
287 | | o 13 2702dd0c91e7 r6 | |
288 | | | | |
289 | | | o 12 1d8d22637c2d r15 | |
290 | | |/| | |
291 | | | o 11 43227190fef8 r14 | |
292 | | | | | |
293 | | o | 10 f0f3ef9a6cd5 r5 | |
294 | | | | | |
295 | | o | 9 4c748ffd1a46 r4 | |
296 | | | | | |
297 +-------o 8 e46a4836065c r12 | |
298 | | | | | |
299 o-----+ 7 bab5d5bf48bd r11 | |
300 / / / | |
301 +-----@ 6 ff43616e5d0f r10 | |
302 | | | | |
303 o | | 5 d62d843c9a01 r8 | |
304 | | | | |
305 o---+ 4 e7d9710d9fc6 r7 | |
306 / / | |
307 | o 3 2b6d669947cd r3 | |
308 |/| | |
309 o | 2 fa942426a6fd r2 | |
310 | | | |
311 | o 1 66f7d451a68b r1 | |
312 |/ | |
313 o 0 1ea73414a91b r0 | |
314 | |
315 $ hg -R repo_C log -G > C.log | |
316 | |
317 $ hg clone repo_A repo_D --rev 2 | |
318 adding changesets | |
319 adding manifests | |
320 adding file changes | |
321 added 2 changesets with 0 changes to 0 files | |
322 new changesets 1ea73414a91b:fa942426a6fd | |
323 updating to branch default | |
324 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
325 $ hg -R repo_D pull --rev 10 | |
326 pulling from $TESTTMP/repo_A (glob) | |
327 searching for changes | |
328 adding changesets | |
329 adding manifests | |
330 adding file changes | |
331 added 5 changesets with 0 changes to 0 files | |
332 new changesets 66f7d451a68b:ff43616e5d0f | |
333 (run 'hg update' to get a working copy) | |
334 $ hg -R repo_D pull --rev 15 | |
335 pulling from $TESTTMP/repo_A (glob) | |
336 searching for changes | |
337 adding changesets | |
338 adding manifests | |
339 adding file changes | |
340 added 4 changesets with 0 changes to 0 files (+1 heads) | |
341 new changesets 4c748ffd1a46:1d8d22637c2d | |
342 (run 'hg heads' to see heads, 'hg merge' to merge) | |
343 $ hg -R repo_D pull | |
344 pulling from $TESTTMP/repo_A (glob) | |
345 searching for changes | |
346 adding changesets | |
347 adding manifests | |
348 adding file changes | |
349 added 5 changesets with 0 changes to 0 files (+4 heads) | |
350 new changesets 2702dd0c91e7:b4594d867745 | |
351 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
352 $ hg -R repo_D log -G | |
353 o 15 b4594d867745 r13 tip | |
354 | | |
355 | o 14 e46a4836065c r12 | |
356 |/ | |
357 o 13 bab5d5bf48bd r11 | |
358 | | |
359 | o 12 dcbb326fdec2 r9 | |
360 | | | |
361 | | o 11 2702dd0c91e7 r6 | |
362 | | | | |
363 | | | o 10 1d8d22637c2d r15 | |
364 | | |/| | |
365 +-----o 9 43227190fef8 r14 | |
366 | | | | |
367 | | o 8 f0f3ef9a6cd5 r5 | |
368 | | | | |
369 | | o 7 4c748ffd1a46 r4 | |
370 | | | | |
371 | +---o 6 ff43616e5d0f r10 | |
372 | | | | |
373 | o | 5 d62d843c9a01 r8 | |
374 | | | | |
375 | o | 4 e7d9710d9fc6 r7 | |
376 |/ / | |
377 o | 3 2b6d669947cd r3 | |
378 |\| | |
379 o | 2 66f7d451a68b r1 | |
380 | | | |
381 | @ 1 fa942426a6fd r2 | |
382 |/ | |
383 o 0 1ea73414a91b r0 | |
384 | |
385 $ hg -R repo_D log -G > D.log | |
386 | |
387 check the log output are different | |
388 | |
389 $ python "$RUNTESTDIR/md5sum.py" *.log | |
390 55919ebc9c02f28070cf3255b1690f8c A.log | |
391 c6244b76a60d0707767dc71780e544f3 B.log | |
392 4d8b08b8c50ecbdd2460a62e5852d84d C.log | |
393 0f327003593b50b9591bea8ee28acb81 D.log | |
394 | |
395 bug stable ordering should be identical | |
396 --------------------------------------- | |
397 | |
398 $ repos="A B C D " | |
399 | |
400 for 'all()' | |
401 | |
402 $ for x in $repos; do | |
403 > echo $x | |
404 > hg -R repo_$x showsort --rev 'all()' > ${x}.all.order; | |
405 > done | |
406 A | |
407 B | |
408 C | |
409 D | |
410 | |
411 $ python "$RUNTESTDIR/md5sum.py" *.all.order | |
412 0c6b2e6f15249c0359b0f93e28c5bd1c A.all.order | |
413 0c6b2e6f15249c0359b0f93e28c5bd1c B.all.order | |
414 0c6b2e6f15249c0359b0f93e28c5bd1c C.all.order | |
415 0c6b2e6f15249c0359b0f93e28c5bd1c D.all.order | |
416 | |
417 one specific head | |
418 | |
419 $ for x in $repos; do | |
420 > hg -R repo_$x showsort --rev 'b4594d867745' > ${x}.b4594d867745.order; | |
421 > done | |
422 | |
423 $ python "$RUNTESTDIR/md5sum.py" *.b4594d867745.order | |
424 5c40900a22008f24eab8dfe2f30ad79f A.b4594d867745.order | |
425 5c40900a22008f24eab8dfe2f30ad79f B.b4594d867745.order | |
426 5c40900a22008f24eab8dfe2f30ad79f C.b4594d867745.order | |
427 5c40900a22008f24eab8dfe2f30ad79f D.b4594d867745.order | |
428 | |
429 one secific heads, that is a merge | |
430 | |
431 $ for x in $repos; do | |
432 > hg -R repo_$x showsort --rev '1d8d22637c2d' > ${x}.1d8d22637c2d.order; | |
433 > done | |
434 | |
435 $ python "$RUNTESTDIR/md5sum.py" *.1d8d22637c2d.order | |
436 77dc20a6f86db9103df8edaae9ad2754 A.1d8d22637c2d.order | |
437 77dc20a6f86db9103df8edaae9ad2754 B.1d8d22637c2d.order | |
438 77dc20a6f86db9103df8edaae9ad2754 C.1d8d22637c2d.order | |
439 77dc20a6f86db9103df8edaae9ad2754 D.1d8d22637c2d.order | |
440 | |
441 changeset that are not heads | |
442 | |
443 $ for x in $repos; do | |
444 > hg -R repo_$x showsort --rev 'e7d9710d9fc6+43227190fef8' > ${x}.non-heads.order; | |
445 > done | |
446 | |
447 $ python "$RUNTESTDIR/md5sum.py" *.non-heads.order | |
448 94e0ea8cdade135dabde4ec5e9954329 A.non-heads.order | |
449 94e0ea8cdade135dabde4ec5e9954329 B.non-heads.order | |
450 94e0ea8cdade135dabde4ec5e9954329 C.non-heads.order | |
451 94e0ea8cdade135dabde4ec5e9954329 D.non-heads.order | |
452 | |
453 Check with different subset | |
454 | |
455 $ hg clone repo_A repo_E --rev "43227190fef8" | |
456 adding changesets | |
457 adding manifests | |
458 adding file changes | |
459 added 5 changesets with 0 changes to 0 files | |
460 new changesets 1ea73414a91b:43227190fef8 | |
461 updating to branch default | |
462 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
463 $ hg -R repo_E pull --rev e7d9710d9fc6 | |
464 pulling from $TESTTMP/repo_A (glob) | |
465 searching for changes | |
466 adding changesets | |
467 adding manifests | |
468 adding file changes | |
469 added 1 changesets with 0 changes to 0 files (+1 heads) | |
470 new changesets e7d9710d9fc6 | |
471 (run 'hg heads' to see heads, 'hg merge' to merge) | |
472 | |
473 $ hg clone repo_A repo_F --rev "1d8d22637c2d" | |
474 adding changesets | |
475 adding manifests | |
476 adding file changes | |
477 added 8 changesets with 0 changes to 0 files | |
478 new changesets 1ea73414a91b:1d8d22637c2d | |
479 updating to branch default | |
480 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
481 $ hg -R repo_F pull --rev d62d843c9a01 | |
482 pulling from $TESTTMP/repo_A (glob) | |
483 searching for changes | |
484 adding changesets | |
485 adding manifests | |
486 adding file changes | |
487 added 2 changesets with 0 changes to 0 files (+1 heads) | |
488 new changesets e7d9710d9fc6:d62d843c9a01 | |
489 (run 'hg heads' to see heads, 'hg merge' to merge) | |
490 | |
491 $ hg clone repo_A repo_G --rev "e7d9710d9fc6" | |
492 adding changesets | |
493 adding manifests | |
494 adding file changes | |
495 added 5 changesets with 0 changes to 0 files | |
496 new changesets 1ea73414a91b:e7d9710d9fc6 | |
497 updating to branch default | |
498 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
499 $ hg -R repo_G pull --rev 43227190fef8 | |
500 pulling from $TESTTMP/repo_A (glob) | |
501 searching for changes | |
502 adding changesets | |
503 adding manifests | |
504 adding file changes | |
505 added 1 changesets with 0 changes to 0 files (+1 heads) | |
506 new changesets 43227190fef8 | |
507 (run 'hg heads' to see heads, 'hg merge' to merge) | |
508 $ hg -R repo_G pull --rev 2702dd0c91e7 | |
509 pulling from $TESTTMP/repo_A (glob) | |
510 searching for changes | |
511 adding changesets | |
512 adding manifests | |
513 adding file changes | |
514 added 3 changesets with 0 changes to 0 files (+1 heads) | |
515 new changesets 4c748ffd1a46:2702dd0c91e7 | |
516 (run 'hg heads .' to see heads, 'hg merge' to merge) | |
517 | |
518 $ for x in E F G; do | |
519 > hg -R repo_$x showsort --rev 'e7d9710d9fc6+43227190fef8' > ${x}.non-heads.order; | |
520 > done | |
521 | |
522 $ python "$RUNTESTDIR/md5sum.py" *.non-heads.order | |
523 94e0ea8cdade135dabde4ec5e9954329 A.non-heads.order | |
524 94e0ea8cdade135dabde4ec5e9954329 B.non-heads.order | |
525 94e0ea8cdade135dabde4ec5e9954329 C.non-heads.order | |
526 94e0ea8cdade135dabde4ec5e9954329 D.non-heads.order | |
527 94e0ea8cdade135dabde4ec5e9954329 E.non-heads.order | |
528 94e0ea8cdade135dabde4ec5e9954329 F.non-heads.order | |
529 94e0ea8cdade135dabde4ec5e9954329 G.non-heads.order | |
530 | |
531 Multiple recursions | |
532 =================== | |
533 | |
534 $ hg init recursion_A | |
535 $ cd recursion_A | |
536 $ hg debugbuilddag ' | |
537 > .:base | |
538 > +3:A | |
539 > <base.:B | |
540 > +2/A:C | |
541 > <A+2:D | |
542 > <B./D:E | |
543 > +3:F | |
544 > <C+3/E | |
545 > +2 | |
546 > ' | |
547 $ hg log -G | |
548 o 20 160a7a0adbf4 r20 tip | |
549 | | |
550 o 19 1c645e73dbc6 r19 | |
551 | | |
552 o 18 0496f0a6a143 r18 | |
553 |\ | |
554 | o 17 d64d500024d1 r17 | |
555 | | | |
556 | o 16 4dbf739dd63f r16 | |
557 | | | |
558 | o 15 9fff0871d230 r15 | |
559 | | | |
560 | | o 14 4bbfc6078919 r14 F | |
561 | | | | |
562 | | o 13 013b27f11536 r13 | |
563 | | | | |
564 +---o 12 a66b68853635 r12 | |
565 | | | |
566 o | 11 001194dd78d5 r11 E | |
567 |\ \ | |
568 | o | 10 6ee532b68cfa r10 | |
569 | | | | |
570 o | | 9 529dfc5bb875 r9 D | |
571 | | | | |
572 o | | 8 abf57d94268b r8 | |
573 | | | | |
574 +---o 7 5f18015f9110 r7 C | |
575 | | | | |
576 | | o 6 a2f58e9c1e56 r6 | |
577 | | | | |
578 | | o 5 3a367db1fabc r5 | |
579 | |/ | |
580 | o 4 e7bd5218ca15 r4 B | |
581 | | | |
582 o | 3 2dc09a01254d r3 A | |
583 | | | |
584 o | 2 01241442b3c2 r2 | |
585 | | | |
586 o | 1 66f7d451a68b r1 | |
587 |/ | |
588 o 0 1ea73414a91b r0 base | |
589 | |
590 $ hg debugdepth -r 'all()' | |
591 1ea73414a91b 1 | |
592 66f7d451a68b 2 | |
593 01241442b3c2 3 | |
594 2dc09a01254d 4 | |
595 e7bd5218ca15 2 | |
596 3a367db1fabc 3 | |
597 a2f58e9c1e56 4 | |
598 5f18015f9110 8 | |
599 abf57d94268b 5 | |
600 529dfc5bb875 6 | |
601 6ee532b68cfa 3 | |
602 001194dd78d5 9 | |
603 a66b68853635 10 | |
604 013b27f11536 11 | |
605 4bbfc6078919 12 | |
606 9fff0871d230 9 | |
607 4dbf739dd63f 10 | |
608 d64d500024d1 11 | |
609 0496f0a6a143 16 | |
610 1c645e73dbc6 17 | |
611 160a7a0adbf4 18 | |
612 $ hg showsort --rev 'all()' | |
613 1ea73414a91b | |
614 66f7d451a68b | |
615 01241442b3c2 | |
616 2dc09a01254d | |
617 abf57d94268b | |
618 529dfc5bb875 | |
619 e7bd5218ca15 | |
620 3a367db1fabc | |
621 a2f58e9c1e56 | |
622 5f18015f9110 | |
623 9fff0871d230 | |
624 4dbf739dd63f | |
625 d64d500024d1 | |
626 6ee532b68cfa | |
627 001194dd78d5 | |
628 0496f0a6a143 | |
629 1c645e73dbc6 | |
630 160a7a0adbf4 | |
631 a66b68853635 | |
632 013b27f11536 | |
633 4bbfc6078919 | |
634 $ checktopo 'all()' | |
635 === checking 1ea73414a91b === | |
636 === checking 66f7d451a68b === | |
637 === checking 01241442b3c2 === | |
638 === checking 2dc09a01254d === | |
639 === checking abf57d94268b === | |
640 === checking 529dfc5bb875 === | |
641 === checking e7bd5218ca15 === | |
642 === checking 3a367db1fabc === | |
643 === checking a2f58e9c1e56 === | |
644 === checking 5f18015f9110 === | |
645 === checking 9fff0871d230 === | |
646 === checking 4dbf739dd63f === | |
647 === checking d64d500024d1 === | |
648 === checking 6ee532b68cfa === | |
649 === checking 001194dd78d5 === | |
650 === checking 0496f0a6a143 === | |
651 === checking 1c645e73dbc6 === | |
652 === checking 160a7a0adbf4 === | |
653 === checking a66b68853635 === | |
654 === checking 013b27f11536 === | |
655 === checking 4bbfc6078919 === | |
656 $ hg showsort --rev 'all()' > ../multiple.source.order | |
657 $ hg log -r tip | |
658 20 160a7a0adbf4 r20 tip | |
659 $ cd .. | |
660 | |
661 $ hg clone recursion_A recursion_random --rev 0 | |
662 adding changesets | |
663 adding manifests | |
664 adding file changes | |
665 added 1 changesets with 0 changes to 0 files | |
666 new changesets 1ea73414a91b | |
667 updating to branch default | |
668 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
669 $ cd recursion_random | |
670 $ for x in `python ../random_rev.py 15 5`; do | |
671 > # using python to benefit from the random seed | |
672 > hg pull -r $x --quiet | |
673 > done; | |
674 $ hg pull --quiet | |
675 $ hg showsort --rev 'all()' > ../multiple.random.order | |
676 $ python "$RUNTESTDIR/md5sum.py" ../multiple.*.order | |
677 6ff802a0a5f0a3ddd82b25f860238fbd ../multiple.random.order | |
678 6ff802a0a5f0a3ddd82b25f860238fbd ../multiple.source.order | |
679 $ hg showsort --rev 'all()' | |
680 1ea73414a91b | |
681 66f7d451a68b | |
682 01241442b3c2 | |
683 2dc09a01254d | |
684 abf57d94268b | |
685 529dfc5bb875 | |
686 e7bd5218ca15 | |
687 3a367db1fabc | |
688 a2f58e9c1e56 | |
689 5f18015f9110 | |
690 9fff0871d230 | |
691 4dbf739dd63f | |
692 d64d500024d1 | |
693 6ee532b68cfa | |
694 001194dd78d5 | |
695 0496f0a6a143 | |
696 1c645e73dbc6 | |
697 160a7a0adbf4 | |
698 a66b68853635 | |
699 013b27f11536 | |
700 4bbfc6078919 | |
701 $ cd .. | |
702 | |
703 | |
704 Test behavior with oedipus merges | |
705 ================================= | |
706 | |
707 $ hg init recursion_oedipus | |
708 $ cd recursion_oedipus | |
709 $ echo base > base | |
710 $ hg add base | |
711 $ hg ci -m base | |
712 $ hg branch foo | |
713 marked working directory as branch foo | |
714 (branches are permanent and global, did you want a bookmark?) | |
715 $ echo foo1 > foo1 | |
716 $ hg add foo1 | |
717 $ hg ci -m foo1 | |
718 $ echo foo2 > foo2 | |
719 $ hg add foo2 | |
720 $ hg ci -m foo2 | |
721 $ hg up default | |
722 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
723 $ hg merge foo | |
724 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
725 (branch merge, don't forget to commit) | |
726 $ hg ci -m oedipus_merge | |
727 $ echo default1 > default1 | |
728 $ hg add default1 | |
729 $ hg ci -m default1 | |
730 $ hg log -G | |
731 @ 4 7f2454f6b04f default1 tip | |
732 | | |
733 o 3 ed776db7ed63 oedipus_merge | |
734 |\ | |
735 | o 2 0dedbcd995b6 foo2 | |
736 | | | |
737 | o 1 47da0f2c25e2 foo1 | |
738 |/ | |
739 o 0 d20a80d4def3 base | |
740 | |
741 $ hg debugdepth -r 'all()' | |
742 d20a80d4def3 1 | |
743 47da0f2c25e2 2 | |
744 0dedbcd995b6 3 | |
745 ed776db7ed63 4 | |
746 7f2454f6b04f 5 | |
747 $ hg showsort --rev '.' | |
748 d20a80d4def3 | |
749 47da0f2c25e2 | |
750 0dedbcd995b6 | |
751 ed776db7ed63 | |
752 7f2454f6b04f |