Mercurial > evolve
comparison tests/test-topic-stack.t @ 4067:fb4801478d5d
stack: display 's#' instead of 't#' and 'b#'
If we want people to use it, we should display it.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 Sep 2018 17:07:36 +0200 |
parents | 1aa5f851d2c0 |
children | dc247e648f43 d5a2cc19903f 09337aae08d4 |
comparison
equal
deleted
inserted
replaced
4066:1aa5f851d2c0 | 4067:fb4801478d5d |
---|---|
58 switching to topic other | 58 switching to topic other |
59 0 files updated, 0 files merged, 4 files removed, 0 files unresolved | 59 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
60 $ hg topic --list | 60 $ hg topic --list |
61 ### topic: other | 61 ### topic: other |
62 ### target: default (branch) | 62 ### target: default (branch) |
63 t2@ c_b (current) | 63 s2@ c_b (current) |
64 t1: c_a | 64 s1: c_a |
65 $ hg phase --public 'topic("other")' | 65 $ hg phase --public 'topic("other")' |
66 active topic 'other' is now empty | 66 active topic 'other' is now empty |
67 (use 'hg topic --clear' to clear it if needed) | 67 (use 'hg topic --clear' to clear it if needed) |
68 | 68 |
69 After changing the phase of all the changesets in "other" to public, the topic should still be active, but is empty. We should be better at informating the user about it and displaying good data in this case. | 69 After changing the phase of all the changesets in "other" to public, the topic should still be active, but is empty. We should be better at informating the user about it and displaying good data in this case. |
73 * other (0 changesets) | 73 * other (0 changesets) |
74 $ hg stack | 74 $ hg stack |
75 ### topic: other | 75 ### topic: other |
76 ### target: default (branch) | 76 ### target: default (branch) |
77 (stack is empty) | 77 (stack is empty) |
78 t0^ c_b (base current) | 78 s0^ c_b (base current) |
79 | 79 |
80 $ hg up foo | 80 $ hg up foo |
81 switching to topic foo | 81 switching to topic foo |
82 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | 82 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
83 | 83 |
89 $ hg topic | 89 $ hg topic |
90 * foo (4 changesets) | 90 * foo (4 changesets) |
91 $ hg stack | 91 $ hg stack |
92 ### topic: foo | 92 ### topic: foo |
93 ### target: default (branch) | 93 ### target: default (branch) |
94 t4@ c_f (current) | 94 s4@ c_f (current) |
95 t3: c_e | 95 s3: c_e |
96 t2: c_d | 96 s2: c_d |
97 t1: c_c | 97 s1: c_c |
98 t0^ c_b (base) | 98 s0^ c_b (base) |
99 $ hg stack -v | 99 $ hg stack -v |
100 ### topic: foo | 100 ### topic: foo |
101 ### target: default (branch) | 101 ### target: default (branch) |
102 t4(6559e6d93aea)@ c_f (current) | 102 s4(6559e6d93aea)@ c_f (current) |
103 t3(0f9ac936c87d): c_e | 103 s3(0f9ac936c87d): c_e |
104 t2(e629654d7050): c_d | 104 s2(e629654d7050): c_d |
105 t1(8522f9e3fee9): c_c | 105 s1(8522f9e3fee9): c_c |
106 t0(ea705abc4f51)^ c_b (base) | 106 s0(ea705abc4f51)^ c_b (base) |
107 $ hg stack -Tjson | python -m json.tool | 107 $ hg stack -Tjson | python -m json.tool |
108 [ | 108 [ |
109 { | 109 { |
110 "isentry": true, | 110 "isentry": true, |
111 "topic.stack.desc": "c_f", | 111 "topic.stack.desc": "c_f", |
211 $ hg topics | 211 $ hg topics |
212 * foo (4 changesets) | 212 * foo (4 changesets) |
213 $ hg stack | 213 $ hg stack |
214 ### topic: foo | 214 ### topic: foo |
215 ### target: default (branch) | 215 ### target: default (branch) |
216 t4@ c_f (current) | 216 s4@ c_f (current) |
217 t3: c_e | 217 s3: c_e |
218 t2: c_d | 218 s2: c_d |
219 t1: c_c | 219 s1: c_c |
220 t0^ c_b (base) | 220 s0^ c_b (base) |
221 $ hg topics --config ui.strict=true | 221 $ hg topics --config ui.strict=true |
222 * foo (4 changesets) | 222 * foo (4 changesets) |
223 $ hg stack --config ui.strict=true | 223 $ hg stack --config ui.strict=true |
224 ### topic: foo | 224 ### topic: foo |
225 ### target: default (branch) | 225 ### target: default (branch) |
226 t4@ c_f (current) | 226 s4@ c_f (current) |
227 t3: c_e | 227 s3: c_e |
228 t2: c_d | 228 s2: c_d |
229 t1: c_c | 229 s1: c_c |
230 t0^ c_b (base) | 230 s0^ c_b (base) |
231 | 231 |
232 error case, nothing to list | 232 error case, nothing to list |
233 | 233 |
234 $ hg topic --clear | 234 $ hg topic --clear |
235 $ hg stack | 235 $ hg stack |
236 ### target: default (branch) | 236 ### target: default (branch) |
237 (stack is empty) | 237 (stack is empty) |
238 b0^ c_f (base current) | 238 s0^ c_f (base current) |
239 | 239 |
240 Test "t#" reference | 240 Test "t#" reference |
241 ------------------- | 241 ------------------- |
242 | 242 |
243 | 243 |
285 o 0 default {} public c_a | 285 o 0 default {} public c_a |
286 | 286 |
287 $ hg topic --list | 287 $ hg topic --list |
288 ### topic: foo | 288 ### topic: foo |
289 ### target: default (branch) | 289 ### target: default (branch) |
290 t4$ c_f (unstable) | 290 s4$ c_f (unstable) |
291 t3$ c_e (unstable) | 291 s3$ c_e (unstable) |
292 t2@ c_d (current) | 292 s2@ c_d (current) |
293 t1: c_c | 293 s1: c_c |
294 t0^ c_b (base) | 294 s0^ c_b (base) |
295 $ hg up s3 | 295 $ hg up s3 |
296 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 296 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
297 $ hg topic --list | 297 $ hg topic --list |
298 ### topic: foo | 298 ### topic: foo |
299 ### target: default (branch) | 299 ### target: default (branch) |
300 t4$ c_f (unstable) | 300 s4$ c_f (unstable) |
301 t3$ c_e (current unstable) | 301 s3$ c_e (current unstable) |
302 t2: c_d | 302 s2: c_d |
303 t1: c_c | 303 s1: c_c |
304 t0^ c_b (base) | 304 s0^ c_b (base) |
305 $ hg topic --list --color=debug | 305 $ hg topic --list --color=debug |
306 [topic.stack.summary.topic|### topic: [topic.active|foo]] | 306 [topic.stack.summary.topic|### topic: [topic.active|foo]] |
307 [topic.stack.summary.branches|### target: default (branch)] | 307 [topic.stack.summary.branches|### target: default (branch)] |
308 [topic.stack.index topic.stack.index.unstable|t4][topic.stack.state topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.unstable|c_f][topic.stack.state topic.stack.state.unstable| (unstable)] | 308 [topic.stack.index topic.stack.index.unstable|s4][topic.stack.state topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.unstable|c_f][topic.stack.state topic.stack.state.unstable| (unstable)] |
309 [topic.stack.index topic.stack.index.current topic.stack.index.unstable|t3][topic.stack.state topic.stack.state.current topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.current topic.stack.desc.unstable|c_e][topic.stack.state topic.stack.state.current topic.stack.state.unstable| (current unstable)] | 309 [topic.stack.index topic.stack.index.current topic.stack.index.unstable|s3][topic.stack.state topic.stack.state.current topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.current topic.stack.desc.unstable|c_e][topic.stack.state topic.stack.state.current topic.stack.state.unstable| (current unstable)] |
310 [topic.stack.index topic.stack.index.clean|t2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d] | 310 [topic.stack.index topic.stack.index.clean|s2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d] |
311 [topic.stack.index topic.stack.index.clean|t1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c] | 311 [topic.stack.index topic.stack.index.clean|s1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c] |
312 [topic.stack.index topic.stack.index.base|t0][topic.stack.state topic.stack.state.base|^] [topic.stack.desc topic.stack.desc.base|c_b][topic.stack.state topic.stack.state.base| (base)] | 312 [topic.stack.index topic.stack.index.base|s0][topic.stack.state topic.stack.state.base|^] [topic.stack.desc topic.stack.desc.base|c_b][topic.stack.state topic.stack.state.base| (base)] |
313 $ hg up s2 | 313 $ hg up s2 |
314 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | 314 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
315 | 315 |
316 Also test the revset: | 316 Also test the revset: |
317 | 317 |
383 Test output | 383 Test output |
384 | 384 |
385 $ hg top -l | 385 $ hg top -l |
386 ### topic: foo (2 heads) | 386 ### topic: foo (2 heads) |
387 ### target: default (branch) | 387 ### target: default (branch) |
388 t6@ c_h (current) | 388 s6@ c_h (current) |
389 t5: c_g | 389 s5: c_g |
390 t2^ c_d (base) | 390 s2^ c_d (base) |
391 t4: c_f | 391 s4: c_f |
392 t3: c_e | 392 s3: c_e |
393 t2: c_d | 393 s2: c_d |
394 t1: c_c | 394 s1: c_c |
395 t0^ c_b (base) | 395 s0^ c_b (base) |
396 | 396 |
397 Case with multiple heads on the topic with unstability involved | 397 Case with multiple heads on the topic with unstability involved |
398 --------------------------------------------------------------- | 398 --------------------------------------------------------------- |
399 | 399 |
400 We amend the message to make sure the display base pick the right changeset | 400 We amend the message to make sure the display base pick the right changeset |
428 | 428 |
429 | 429 |
430 $ hg topic --list | 430 $ hg topic --list |
431 ### topic: foo (2 heads) | 431 ### topic: foo (2 heads) |
432 ### target: default (branch) | 432 ### target: default (branch) |
433 t6: c_h | 433 s6: c_h |
434 t5: c_g | 434 s5: c_g |
435 t2^ c_D (base current) | 435 s2^ c_D (base current) |
436 t4$ c_f (unstable) | 436 s4$ c_f (unstable) |
437 t3$ c_e (unstable) | 437 s3$ c_e (unstable) |
438 t2@ c_D (current) | 438 s2@ c_D (current) |
439 t1: c_c | 439 s1: c_c |
440 t0^ c_b (base) | 440 s0^ c_b (base) |
441 | 441 |
442 Trying to list non existing topic | 442 Trying to list non existing topic |
443 $ hg stack thisdoesnotexist | 443 $ hg stack thisdoesnotexist |
444 abort: cannot resolve "thisdoesnotexist": no such topic found | 444 abort: cannot resolve "thisdoesnotexist": no such topic found |
445 [255] | 445 [255] |
554 XXX: The behind count is weird, because the topic are interleaved. | 554 XXX: The behind count is weird, because the topic are interleaved. |
555 | 555 |
556 $ hg stack | 556 $ hg stack |
557 ### topic: foobar | 557 ### topic: foobar |
558 ### target: default (branch), 3 behind | 558 ### target: default (branch), 3 behind |
559 t2@ c_e (current) | 559 s2@ c_e (current) |
560 ^ c_h | 560 ^ c_h |
561 t1: c_D | 561 s1: c_D |
562 t0^ c_c (base) | 562 s0^ c_c (base) |
563 | 563 |
564 $ hg stack foo | 564 $ hg stack foo |
565 ### topic: foo | 565 ### topic: foo |
566 ### target: default (branch), ambiguous rebase destination - topic 'foo' has 3 heads | 566 ### target: default (branch), ambiguous rebase destination - topic 'foo' has 3 heads |
567 t4: c_f | 567 s4: c_f |
568 ^ c_e | 568 ^ c_e |
569 t3: c_h | 569 s3: c_h |
570 t2: c_g | 570 s2: c_g |
571 ^ c_D | 571 ^ c_D |
572 t1: c_c | 572 s1: c_c |
573 t0^ c_b (base) | 573 s0^ c_b (base) |
574 | 574 |
575 case involving a merge | 575 case involving a merge |
576 ---------------------- | 576 ---------------------- |
577 | 577 |
578 $ cd .. | 578 $ cd .. |
644 | 644 |
645 | 645 |
646 $ hg stack red | 646 $ hg stack red |
647 ### topic: red | 647 ### topic: red |
648 ### target: default (branch), 6 behind | 648 ### target: default (branch), 6 behind |
649 t5: c_H | 649 s5: c_H |
650 ^ c_G | 650 ^ c_G |
651 ^ c_D | 651 ^ c_D |
652 t4: c_C | 652 s4: c_C |
653 t1^ c_B (base) | 653 s1^ c_B (base) |
654 t3: c_F | 654 s3: c_F |
655 t2: c_E | 655 s2: c_E |
656 t1: c_B | 656 s1: c_B |
657 t0^ c_A (base) | 657 s0^ c_A (base) |
658 $ hg stack blue | 658 $ hg stack blue |
659 ### topic: blue | 659 ### topic: blue |
660 ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads | 660 ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads |
661 t3@ c_I (current) | 661 s3@ c_I (current) |
662 ^ c_H | 662 ^ c_H |
663 t2: c_D | 663 s2: c_D |
664 ^ c_C | 664 ^ c_C |
665 t1: c_G | 665 s1: c_G |
666 t0^ c_F (base) | 666 s0^ c_F (base) |
667 | 667 |
668 Even with some obsolete and orphan changesets | 668 Even with some obsolete and orphan changesets |
669 | 669 |
670 (the ordering of each branch of "blue" change because their hash change. we | 670 (the ordering of each branch of "blue" change because their hash change. we |
671 should stabilize this eventuelly) | 671 should stabilize this eventuelly) |
710 | 710 |
711 | 711 |
712 $ hg stack red | 712 $ hg stack red |
713 ### topic: red | 713 ### topic: red |
714 ### target: default (branch), ambiguous rebase destination - topic 'red' has 3 heads | 714 ### target: default (branch), ambiguous rebase destination - topic 'red' has 3 heads |
715 t5$ c_H (unstable) | 715 s5$ c_H (unstable) |
716 ^ c_G | 716 ^ c_G |
717 ^ c_D | 717 ^ c_D |
718 t4$ c_C (unstable) | 718 s4$ c_C (unstable) |
719 t1^ c_B (base) | 719 s1^ c_B (base) |
720 t3$ c_F (unstable) | 720 s3$ c_F (unstable) |
721 t2$ c_E (unstable) | 721 s2$ c_E (unstable) |
722 t1: c_B | 722 s1: c_B |
723 t0^ c_A (base) | 723 s0^ c_A (base) |
724 $ hg stack blue | 724 $ hg stack blue |
725 ### topic: blue | 725 ### topic: blue |
726 ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads | 726 ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads |
727 t3$ c_I (unstable) | 727 s3$ c_I (unstable) |
728 ^ c_H | 728 ^ c_H |
729 t2$ c_G (unstable) | 729 s2$ c_G (unstable) |
730 ^ c_F | 730 ^ c_F |
731 t1$ c_D (current unstable) | 731 s1$ c_D (current unstable) |
732 t0^ c_C (base unstable) | 732 s0^ c_C (base unstable) |
733 | 733 |
734 more obsolescence | 734 more obsolescence |
735 | 735 |
736 $ hg up 'max(desc("c_H"))' | 736 $ hg up 'max(desc("c_H"))' |
737 switching to topic red | 737 switching to topic red |
784 | 784 |
785 | 785 |
786 $ hg stack red | 786 $ hg stack red |
787 ### topic: red | 787 ### topic: red |
788 ### target: default (branch), ambiguous rebase destination - topic 'red' has 3 heads | 788 ### target: default (branch), ambiguous rebase destination - topic 'red' has 3 heads |
789 t5$ c_H (unstable) | 789 s5$ c_H (unstable) |
790 ^ c_G | 790 ^ c_G |
791 ^ c_D | 791 ^ c_D |
792 t4$ c_F (unstable) | 792 s4$ c_F (unstable) |
793 t3$ c_E (unstable) | 793 s3$ c_E (unstable) |
794 t1^ c_B (base) | 794 s1^ c_B (base) |
795 t2$ c_C (unstable) | 795 s2$ c_C (unstable) |
796 t1: c_B | 796 s1: c_B |
797 t0^ c_A (base) | 797 s0^ c_A (base) |
798 $ hg stack blue | 798 $ hg stack blue |
799 ### topic: blue | 799 ### topic: blue |
800 ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads | 800 ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads |
801 t3$ c_I (unstable) | 801 s3$ c_I (unstable) |
802 ^ c_H | 802 ^ c_H |
803 t2$ c_G (unstable) | 803 s2$ c_G (unstable) |
804 ^ c_F | 804 ^ c_F |
805 t1$ c_D (current unstable) | 805 s1$ c_D (current unstable) |
806 t0^ c_C (base unstable) | 806 s0^ c_C (base unstable) |
807 | 807 |
808 Test stack behavior with a split | 808 Test stack behavior with a split |
809 -------------------------------- | 809 -------------------------------- |
810 | 810 |
811 get things linear again | 811 get things linear again |
818 $ hg rebase -r s3 -d s2 | 818 $ hg rebase -r s3 -d s2 |
819 rebasing 8:3bfe800e0486 "c_I" (blue) | 819 rebasing 8:3bfe800e0486 "c_I" (blue) |
820 $ hg stack | 820 $ hg stack |
821 ### topic: blue | 821 ### topic: blue |
822 ### target: default (branch) | 822 ### target: default (branch) |
823 t3: c_I | 823 s3: c_I |
824 t2: c_G | 824 s2: c_G |
825 t1@ c_D (current) | 825 s1@ c_D (current) |
826 t0^ c_A (base) | 826 s0^ c_A (base) |
827 | 827 |
828 making a split | 828 making a split |
829 (first get something to split) | 829 (first get something to split) |
830 | 830 |
831 $ hg up s2 | 831 $ hg up s2 |
840 A Z | 840 A Z |
841 A ggg | 841 A ggg |
842 $ hg stack | 842 $ hg stack |
843 ### topic: blue | 843 ### topic: blue |
844 ### target: default (branch) | 844 ### target: default (branch) |
845 t3$ c_I (unstable) | 845 s3$ c_I (unstable) |
846 t2@ c_G (current) | 846 s2@ c_G (current) |
847 t1: c_D | 847 s1: c_D |
848 t0^ c_A (base) | 848 s0^ c_A (base) |
849 $ hg --config extensions.evolve= --config ui.interactive=yes split << EOF | 849 $ hg --config extensions.evolve= --config ui.interactive=yes split << EOF |
850 > y | 850 > y |
851 > y | 851 > y |
852 > n | 852 > n |
853 > y | 853 > y |
920 Check that stack ouput still make sense | 920 Check that stack ouput still make sense |
921 | 921 |
922 $ hg stack | 922 $ hg stack |
923 ### topic: blue | 923 ### topic: blue |
924 ### target: default (branch) | 924 ### target: default (branch) |
925 t4$ c_I (unstable) | 925 s4$ c_I (unstable) |
926 t3@ c_G (current) | 926 s3@ c_G (current) |
927 t2: c_G | 927 s2: c_G |
928 t1: c_D | 928 s1: c_D |
929 t0^ c_A (base) | 929 s0^ c_A (base) |