Mercurial > evolve
comparison 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 |
comparison
equal
deleted
inserted
replaced
3255:bb3f8c8c1232 | 3256:c82a2632327e |
---|---|
132 2b6d669947cd | 132 2b6d669947cd |
133 43227190fef8 | 133 43227190fef8 |
134 4c748ffd1a46 | 134 4c748ffd1a46 |
135 f0f3ef9a6cd5 | 135 f0f3ef9a6cd5 |
136 1d8d22637c2d | 136 1d8d22637c2d |
137 $ hg showsorthead --rev 1d8d22637c2d --l 4 | |
138 43227190fef8 | |
139 4c748ffd1a46 | |
140 f0f3ef9a6cd5 | |
141 1d8d22637c2d | |
137 $ hg showsorthead --rev b4594d867745 | 142 $ hg showsorthead --rev b4594d867745 |
138 1ea73414a91b | 143 1ea73414a91b |
139 66f7d451a68b | 144 66f7d451a68b |
140 fa942426a6fd | 145 fa942426a6fd |
141 2b6d669947cd | 146 2b6d669947cd |
142 bab5d5bf48bd | 147 bab5d5bf48bd |
143 b4594d867745 | 148 b4594d867745 |
149 $ hg showsorthead --rev b4594d867745 --limit 3 | |
150 2b6d669947cd | |
151 bab5d5bf48bd | |
152 b4594d867745 | |
144 $ hg showsorthead --rev e46a4836065c | 153 $ hg showsorthead --rev e46a4836065c |
145 1ea73414a91b | 154 1ea73414a91b |
146 66f7d451a68b | 155 66f7d451a68b |
147 fa942426a6fd | 156 fa942426a6fd |
148 2b6d669947cd | 157 2b6d669947cd |
149 bab5d5bf48bd | 158 bab5d5bf48bd |
150 e46a4836065c | 159 e46a4836065c |
160 $ hg showsorthead --rev e46a4836065c --limit 2 | |
161 bab5d5bf48bd | |
162 e46a4836065c | |
151 $ hg showsorthead --rev ff43616e5d0f | 163 $ hg showsorthead --rev ff43616e5d0f |
152 1ea73414a91b | 164 1ea73414a91b |
165 66f7d451a68b | |
166 fa942426a6fd | |
167 2b6d669947cd | |
168 e7d9710d9fc6 | |
169 d62d843c9a01 | |
170 ff43616e5d0f | |
171 $ hg showsorthead --rev ff43616e5d0f --limit 6 | |
153 66f7d451a68b | 172 66f7d451a68b |
154 fa942426a6fd | 173 fa942426a6fd |
155 2b6d669947cd | 174 2b6d669947cd |
156 e7d9710d9fc6 | 175 e7d9710d9fc6 |
157 d62d843c9a01 | 176 d62d843c9a01 |
162 fa942426a6fd | 181 fa942426a6fd |
163 2b6d669947cd | 182 2b6d669947cd |
164 e7d9710d9fc6 | 183 e7d9710d9fc6 |
165 d62d843c9a01 | 184 d62d843c9a01 |
166 dcbb326fdec2 | 185 dcbb326fdec2 |
186 $ hg showsorthead --rev dcbb326fdec2 --limit 4 | |
187 2b6d669947cd | |
188 e7d9710d9fc6 | |
189 d62d843c9a01 | |
190 dcbb326fdec2 | |
167 $ hg showsorthead --rev 2702dd0c91e7 | 191 $ hg showsorthead --rev 2702dd0c91e7 |
168 1ea73414a91b | 192 1ea73414a91b |
169 fa942426a6fd | 193 fa942426a6fd |
170 4c748ffd1a46 | 194 4c748ffd1a46 |
195 f0f3ef9a6cd5 | |
196 2702dd0c91e7 | |
197 $ hg showsorthead --rev 2702dd0c91e7 --limit 2 | |
171 f0f3ef9a6cd5 | 198 f0f3ef9a6cd5 |
172 2702dd0c91e7 | 199 2702dd0c91e7 |
173 | 200 |
174 Verify the topological order | 201 Verify the topological order |
175 ---------------------------- | 202 ---------------------------- |
475 one secific heads, that is a merge | 502 one secific heads, that is a merge |
476 | 503 |
477 $ for x in $repos; do | 504 $ for x in $repos; do |
478 > hg -R repo_$x showsort --rev '1d8d22637c2d' > ${x}.1d8d22637c2d.order; | 505 > hg -R repo_$x showsort --rev '1d8d22637c2d' > ${x}.1d8d22637c2d.order; |
479 > hg -R repo_$x showsorthead --rev '1d8d22637c2d' > ${x}.1d8d22637c2d.orderhead; | 506 > hg -R repo_$x showsorthead --rev '1d8d22637c2d' > ${x}.1d8d22637c2d.orderhead; |
507 > hg -R repo_$x showsorthead --rev '1d8d22637c2d' --limit 4 > ${x}.1d8d22637c2d.orderhead-4; | |
480 > done | 508 > done |
481 | 509 |
482 $ python "$RUNTESTDIR/md5sum.py" *.1d8d22637c2d.order | 510 $ python "$RUNTESTDIR/md5sum.py" *.1d8d22637c2d.order |
483 77dc20a6f86db9103df8edaae9ad2754 A.1d8d22637c2d.order | 511 77dc20a6f86db9103df8edaae9ad2754 A.1d8d22637c2d.order |
484 77dc20a6f86db9103df8edaae9ad2754 B.1d8d22637c2d.order | 512 77dc20a6f86db9103df8edaae9ad2754 B.1d8d22637c2d.order |
487 $ python "$RUNTESTDIR/md5sum.py" *.1d8d22637c2d.orderhead | 515 $ python "$RUNTESTDIR/md5sum.py" *.1d8d22637c2d.orderhead |
488 77dc20a6f86db9103df8edaae9ad2754 A.1d8d22637c2d.orderhead | 516 77dc20a6f86db9103df8edaae9ad2754 A.1d8d22637c2d.orderhead |
489 77dc20a6f86db9103df8edaae9ad2754 B.1d8d22637c2d.orderhead | 517 77dc20a6f86db9103df8edaae9ad2754 B.1d8d22637c2d.orderhead |
490 77dc20a6f86db9103df8edaae9ad2754 C.1d8d22637c2d.orderhead | 518 77dc20a6f86db9103df8edaae9ad2754 C.1d8d22637c2d.orderhead |
491 77dc20a6f86db9103df8edaae9ad2754 D.1d8d22637c2d.orderhead | 519 77dc20a6f86db9103df8edaae9ad2754 D.1d8d22637c2d.orderhead |
520 $ python "$RUNTESTDIR/md5sum.py" *.1d8d22637c2d.orderhead-4 | |
521 ea12ffc0007e1b4b911d09dd478881f3 A.1d8d22637c2d.orderhead-4 | |
522 ea12ffc0007e1b4b911d09dd478881f3 B.1d8d22637c2d.orderhead-4 | |
523 ea12ffc0007e1b4b911d09dd478881f3 C.1d8d22637c2d.orderhead-4 | |
524 ea12ffc0007e1b4b911d09dd478881f3 D.1d8d22637c2d.orderhead-4 | |
492 | 525 |
493 changeset that are not heads | 526 changeset that are not heads |
494 | 527 |
495 $ for x in $repos; do | 528 $ for x in $repos; do |
496 > hg -R repo_$x showsort --rev 'e7d9710d9fc6+43227190fef8' > ${x}.non-heads.order; | 529 > hg -R repo_$x showsort --rev 'e7d9710d9fc6+43227190fef8' > ${x}.non-heads.order; |
497 > hg -R repo_$x showsorthead --rev 'e7d9710d9fc6+43227190fef8' > ${x}.non-heads.orderhead; | 530 > hg -R repo_$x showsorthead --rev 'e7d9710d9fc6+43227190fef8' > ${x}.non-heads.orderhead; |
531 > hg -R repo_$x showsorthead --rev 'e7d9710d9fc6+43227190fef8' --limit 6 > ${x}.non-heads.orderhead-6; | |
498 > done | 532 > done |
499 | 533 |
500 $ python "$RUNTESTDIR/md5sum.py" *.non-heads.order | 534 $ python "$RUNTESTDIR/md5sum.py" *.non-heads.order |
501 94e0ea8cdade135dabde4ec5e9954329 A.non-heads.order | 535 94e0ea8cdade135dabde4ec5e9954329 A.non-heads.order |
502 94e0ea8cdade135dabde4ec5e9954329 B.non-heads.order | 536 94e0ea8cdade135dabde4ec5e9954329 B.non-heads.order |
716 4dbf739dd63f | 750 4dbf739dd63f |
717 d64d500024d1 | 751 d64d500024d1 |
718 0496f0a6a143 | 752 0496f0a6a143 |
719 1c645e73dbc6 | 753 1c645e73dbc6 |
720 160a7a0adbf4 | 754 160a7a0adbf4 |
755 $ hg showsorthead --rev '160a7a0adbf4' --limit 7 | |
756 5f18015f9110 | |
757 9fff0871d230 | |
758 4dbf739dd63f | |
759 d64d500024d1 | |
760 0496f0a6a143 | |
761 1c645e73dbc6 | |
762 160a7a0adbf4 | |
721 $ hg showsorthead --rev '4bbfc6078919' | 763 $ hg showsorthead --rev '4bbfc6078919' |
722 1ea73414a91b | 764 1ea73414a91b |
723 66f7d451a68b | 765 66f7d451a68b |
766 01241442b3c2 | |
767 2dc09a01254d | |
768 abf57d94268b | |
769 529dfc5bb875 | |
770 e7bd5218ca15 | |
771 6ee532b68cfa | |
772 001194dd78d5 | |
773 a66b68853635 | |
774 013b27f11536 | |
775 4bbfc6078919 | |
776 $ hg showsorthead --rev '4bbfc6078919' --limit 10 | |
724 01241442b3c2 | 777 01241442b3c2 |
725 2dc09a01254d | 778 2dc09a01254d |
726 abf57d94268b | 779 abf57d94268b |
727 529dfc5bb875 | 780 529dfc5bb875 |
728 e7bd5218ca15 | 781 e7bd5218ca15 |
753 === checking a66b68853635 === | 806 === checking a66b68853635 === |
754 === checking 013b27f11536 === | 807 === checking 013b27f11536 === |
755 === checking 4bbfc6078919 === | 808 === checking 4bbfc6078919 === |
756 $ hg showsort --rev 'all()' > ../multiple.source.order | 809 $ hg showsort --rev 'all()' > ../multiple.source.order |
757 $ hg showsorthead --rev '160a7a0adbf4' > ../160a7a0adbf4.source.orderhead | 810 $ hg showsorthead --rev '160a7a0adbf4' > ../160a7a0adbf4.source.orderhead |
758 $ hg showsorthead --rev '4bbfc6078919' > ../4bbfc6078919.multiple.source.orderhead | 811 $ hg showsorthead --rev '4bbfc6078919' > ../4bbfc6078919.source.orderhead |
759 $ hg log -r tip | 812 $ hg log -r tip |
760 20 160a7a0adbf4 r20 tip | 813 20 160a7a0adbf4 r20 tip |
761 $ cd .. | 814 $ cd .. |
762 | 815 |
763 $ hg clone recursion_A recursion_random --rev 0 | 816 $ hg clone recursion_A recursion_random --rev 0 |
774 > hg pull -r $x --quiet | 827 > hg pull -r $x --quiet |
775 > done; | 828 > done; |
776 $ hg pull --quiet | 829 $ hg pull --quiet |
777 $ hg showsort --rev 'all()' > ../multiple.random.order | 830 $ hg showsort --rev 'all()' > ../multiple.random.order |
778 $ hg showsorthead --rev '160a7a0adbf4' > ../160a7a0adbf4.random.orderhead | 831 $ hg showsorthead --rev '160a7a0adbf4' > ../160a7a0adbf4.random.orderhead |
779 $ hg showsorthead --rev '4bbfc6078919' > ../4bbfc6078919.multiple.random.orderhead | 832 $ hg showsorthead --rev '4bbfc6078919' > ../4bbfc6078919.random.orderhead |
780 $ python "$RUNTESTDIR/md5sum.py" ../multiple.*.order | 833 $ python "$RUNTESTDIR/md5sum.py" ../multiple.*.order |
781 a6547220a9f004c975e365d9561639dd ../multiple.random.order | 834 a6547220a9f004c975e365d9561639dd ../multiple.random.order |
782 a6547220a9f004c975e365d9561639dd ../multiple.source.order | 835 a6547220a9f004c975e365d9561639dd ../multiple.source.order |
783 $ python "$RUNTESTDIR/md5sum.py" ../160a7a0adbf4.*.orderhead | 836 $ python "$RUNTESTDIR/md5sum.py" ../160a7a0adbf4.*.orderhead |
784 48d8911f53869b32e29da26c56e95119 ../160a7a0adbf4.random.orderhead | 837 48d8911f53869b32e29da26c56e95119 ../160a7a0adbf4.random.orderhead |
785 48d8911f53869b32e29da26c56e95119 ../160a7a0adbf4.source.orderhead | 838 48d8911f53869b32e29da26c56e95119 ../160a7a0adbf4.source.orderhead |
786 $ python "$RUNTESTDIR/md5sum.py" ../4bbfc6078919.*.orderhead | 839 $ python "$RUNTESTDIR/md5sum.py" ../4bbfc6078919.*.orderhead |
787 3732305a333d59ec50b91db0f5ab696e ../4bbfc6078919.multiple.random.orderhead | 840 3732305a333d59ec50b91db0f5ab696e ../4bbfc6078919.random.orderhead |
788 3732305a333d59ec50b91db0f5ab696e ../4bbfc6078919.multiple.source.orderhead | 841 3732305a333d59ec50b91db0f5ab696e ../4bbfc6078919.source.orderhead |
789 $ hg showsort --rev 'all()' | 842 $ hg showsort --rev 'all()' |
790 1ea73414a91b | 843 1ea73414a91b |
791 66f7d451a68b | 844 66f7d451a68b |
792 01241442b3c2 | 845 01241442b3c2 |
793 2dc09a01254d | 846 2dc09a01254d |