Mercurial > evolve
diff tests/test-stablesort.t @ 3256:c82a2632327e
stablesort: add a --limit argument
This will be useful when using stable sort within stable range.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 25 Nov 2017 17:37:37 -0500 |
parents | bb3f8c8c1232 |
children | 064738ae1588 |
line wrap: on
line diff
--- a/tests/test-stablesort.t Sat Nov 25 15:14:50 2017 -0500 +++ b/tests/test-stablesort.t Sat Nov 25 17:37:37 2017 -0500 @@ -134,6 +134,11 @@ 4c748ffd1a46 f0f3ef9a6cd5 1d8d22637c2d + $ hg showsorthead --rev 1d8d22637c2d --l 4 + 43227190fef8 + 4c748ffd1a46 + f0f3ef9a6cd5 + 1d8d22637c2d $ hg showsorthead --rev b4594d867745 1ea73414a91b 66f7d451a68b @@ -141,6 +146,10 @@ 2b6d669947cd bab5d5bf48bd b4594d867745 + $ hg showsorthead --rev b4594d867745 --limit 3 + 2b6d669947cd + bab5d5bf48bd + b4594d867745 $ hg showsorthead --rev e46a4836065c 1ea73414a91b 66f7d451a68b @@ -148,6 +157,9 @@ 2b6d669947cd bab5d5bf48bd e46a4836065c + $ hg showsorthead --rev e46a4836065c --limit 2 + bab5d5bf48bd + e46a4836065c $ hg showsorthead --rev ff43616e5d0f 1ea73414a91b 66f7d451a68b @@ -156,6 +168,13 @@ e7d9710d9fc6 d62d843c9a01 ff43616e5d0f + $ hg showsorthead --rev ff43616e5d0f --limit 6 + 66f7d451a68b + fa942426a6fd + 2b6d669947cd + e7d9710d9fc6 + d62d843c9a01 + ff43616e5d0f $ hg showsorthead --rev dcbb326fdec2 1ea73414a91b 66f7d451a68b @@ -164,12 +183,20 @@ e7d9710d9fc6 d62d843c9a01 dcbb326fdec2 + $ hg showsorthead --rev dcbb326fdec2 --limit 4 + 2b6d669947cd + e7d9710d9fc6 + d62d843c9a01 + dcbb326fdec2 $ hg showsorthead --rev 2702dd0c91e7 1ea73414a91b fa942426a6fd 4c748ffd1a46 f0f3ef9a6cd5 2702dd0c91e7 + $ hg showsorthead --rev 2702dd0c91e7 --limit 2 + f0f3ef9a6cd5 + 2702dd0c91e7 Verify the topological order ---------------------------- @@ -477,6 +504,7 @@ $ for x in $repos; do > hg -R repo_$x showsort --rev '1d8d22637c2d' > ${x}.1d8d22637c2d.order; > hg -R repo_$x showsorthead --rev '1d8d22637c2d' > ${x}.1d8d22637c2d.orderhead; + > hg -R repo_$x showsorthead --rev '1d8d22637c2d' --limit 4 > ${x}.1d8d22637c2d.orderhead-4; > done $ python "$RUNTESTDIR/md5sum.py" *.1d8d22637c2d.order @@ -489,12 +517,18 @@ 77dc20a6f86db9103df8edaae9ad2754 B.1d8d22637c2d.orderhead 77dc20a6f86db9103df8edaae9ad2754 C.1d8d22637c2d.orderhead 77dc20a6f86db9103df8edaae9ad2754 D.1d8d22637c2d.orderhead + $ python "$RUNTESTDIR/md5sum.py" *.1d8d22637c2d.orderhead-4 + ea12ffc0007e1b4b911d09dd478881f3 A.1d8d22637c2d.orderhead-4 + ea12ffc0007e1b4b911d09dd478881f3 B.1d8d22637c2d.orderhead-4 + ea12ffc0007e1b4b911d09dd478881f3 C.1d8d22637c2d.orderhead-4 + ea12ffc0007e1b4b911d09dd478881f3 D.1d8d22637c2d.orderhead-4 changeset that are not heads $ for x in $repos; do > hg -R repo_$x showsort --rev 'e7d9710d9fc6+43227190fef8' > ${x}.non-heads.order; > hg -R repo_$x showsorthead --rev 'e7d9710d9fc6+43227190fef8' > ${x}.non-heads.orderhead; + > hg -R repo_$x showsorthead --rev 'e7d9710d9fc6+43227190fef8' --limit 6 > ${x}.non-heads.orderhead-6; > done $ python "$RUNTESTDIR/md5sum.py" *.non-heads.order @@ -718,6 +752,14 @@ 0496f0a6a143 1c645e73dbc6 160a7a0adbf4 + $ hg showsorthead --rev '160a7a0adbf4' --limit 7 + 5f18015f9110 + 9fff0871d230 + 4dbf739dd63f + d64d500024d1 + 0496f0a6a143 + 1c645e73dbc6 + 160a7a0adbf4 $ hg showsorthead --rev '4bbfc6078919' 1ea73414a91b 66f7d451a68b @@ -731,6 +773,17 @@ a66b68853635 013b27f11536 4bbfc6078919 + $ hg showsorthead --rev '4bbfc6078919' --limit 10 + 01241442b3c2 + 2dc09a01254d + abf57d94268b + 529dfc5bb875 + e7bd5218ca15 + 6ee532b68cfa + 001194dd78d5 + a66b68853635 + 013b27f11536 + 4bbfc6078919 $ checktopo 'all()' === checking 1ea73414a91b === === checking 66f7d451a68b === @@ -755,7 +808,7 @@ === checking 4bbfc6078919 === $ hg showsort --rev 'all()' > ../multiple.source.order $ hg showsorthead --rev '160a7a0adbf4' > ../160a7a0adbf4.source.orderhead - $ hg showsorthead --rev '4bbfc6078919' > ../4bbfc6078919.multiple.source.orderhead + $ hg showsorthead --rev '4bbfc6078919' > ../4bbfc6078919.source.orderhead $ hg log -r tip 20 160a7a0adbf4 r20 tip $ cd .. @@ -776,7 +829,7 @@ $ hg pull --quiet $ hg showsort --rev 'all()' > ../multiple.random.order $ hg showsorthead --rev '160a7a0adbf4' > ../160a7a0adbf4.random.orderhead - $ hg showsorthead --rev '4bbfc6078919' > ../4bbfc6078919.multiple.random.orderhead + $ hg showsorthead --rev '4bbfc6078919' > ../4bbfc6078919.random.orderhead $ python "$RUNTESTDIR/md5sum.py" ../multiple.*.order a6547220a9f004c975e365d9561639dd ../multiple.random.order a6547220a9f004c975e365d9561639dd ../multiple.source.order @@ -784,8 +837,8 @@ 48d8911f53869b32e29da26c56e95119 ../160a7a0adbf4.random.orderhead 48d8911f53869b32e29da26c56e95119 ../160a7a0adbf4.source.orderhead $ python "$RUNTESTDIR/md5sum.py" ../4bbfc6078919.*.orderhead - 3732305a333d59ec50b91db0f5ab696e ../4bbfc6078919.multiple.random.orderhead - 3732305a333d59ec50b91db0f5ab696e ../4bbfc6078919.multiple.source.orderhead + 3732305a333d59ec50b91db0f5ab696e ../4bbfc6078919.random.orderhead + 3732305a333d59ec50b91db0f5ab696e ../4bbfc6078919.source.orderhead $ hg showsort --rev 'all()' 1ea73414a91b 66f7d451a68b