Mercurial > evolve
comparison tests/test-topic.t @ 4077:9c025ec4af88 mercurial-4.3
test-compat: merge mercurial-4.4 into mercurial-4.3
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 Sep 2018 22:09:26 +0200 |
parents | 537fd9a86c06 f9a850018daa |
children | e07e764c0f48 |
comparison
equal
deleted
inserted
replaced
4033:b609412b42b0 | 4077:9c025ec4af88 |
---|---|
38 | 38 |
39 The 'stack' will show you information about the stack of commit belonging to | 39 The 'stack' will show you information about the stack of commit belonging to |
40 your current topic. | 40 your current topic. |
41 | 41 |
42 Topic is offering you aliases reference to changeset in your current topic | 42 Topic is offering you aliases reference to changeset in your current topic |
43 stack as 't#'. For example, 't1' refers to the root of your stack, 't2' to the | 43 stack as 's#'. For example, 's1' refers to the root of your stack, 's2' to the |
44 second commits, etc. The 'hg stack' command show these number. | 44 second commits, etc. The 'hg stack' command show these number. 's0' can be |
45 used to refer to the parent of the topic root. Updating using 'hg up s0' will | |
46 keep the topic active. | |
45 | 47 |
46 Push behavior will change a bit with topic. When pushing to a publishing | 48 Push behavior will change a bit with topic. When pushing to a publishing |
47 repository the changesets will turn public and the topic data on them will | 49 repository the changesets will turn public and the topic data on them will |
48 fade away. The logic regarding pushing new heads will behave has before, | 50 fade away. The logic regarding pushing new heads will behave has before, |
49 ignore any topic related data. When pushing to a non-publishing repository | 51 ignore any topic related data. When pushing to a non-publishing repository |
269 * narf (on branch: default, 0 changesets) | 271 * narf (on branch: default, 0 changesets) |
270 $ hg stack | 272 $ hg stack |
271 ### topic: narf | 273 ### topic: narf |
272 ### target: default (branch) | 274 ### target: default (branch) |
273 (stack is empty) | 275 (stack is empty) |
274 t0^ Add file delta (base current) | 276 s0^ Add file delta (base current) |
275 | 277 |
276 Add commits to topic | 278 Add commits to topic |
277 | 279 |
278 $ echo topic work >> alpha | 280 $ echo topic work >> alpha |
279 $ hg ci -m 'start on narf' | 281 $ hg ci -m 'start on narf' |
690 user: test | 692 user: test |
691 date: Thu Jan 01 00:00:00 1970 +0000 | 693 date: Thu Jan 01 00:00:00 1970 +0000 |
692 summary: Add file alpha | 694 summary: Add file alpha |
693 | 695 |
694 No matches because narf is already closed: | 696 No matches because narf is already closed: |
695 $ hg log -r 'topic(narf)' -G | 697 $ hg log -r 'topic("narf")' -G |
696 This regexp should match the topic `fran`: | 698 This regexp should match the topic `fran`: |
697 $ hg log -r 'topic("re:.ra.")' -G | 699 $ hg log -r 'topic("re:.ra.")' -G |
698 o changeset: 9:0469d521db49 | 700 o changeset: 9:0469d521db49 |
699 | tag: tip | 701 | tag: tip |
700 | topic: fran | 702 | topic: fran |
730 user: test | 732 user: test |
731 date: Thu Jan 01 00:00:00 1970 +0000 | 733 date: Thu Jan 01 00:00:00 1970 +0000 |
732 summary: start on fran | 734 summary: start on fran |
733 | 735 |
734 | 736 |
737 Using revsets in topic() | |
738 $ tlog() { | |
739 > hg log -T '{rev}: {topic}\n' -r "$1" | |
740 > } | |
741 | |
742 $ tlog 'topic(9)' | |
743 9: fran | |
744 $ tlog 'topic(8)' | |
745 $ tlog 'topic(head())' | |
746 9: fran | |
747 $ tlog 'topic(:)' | |
748 9: fran | |
749 $ tlog 'topic(all())' | |
750 9: fran | |
751 $ tlog 'topic(topic(fran))' | |
752 9: fran | |
753 $ tlog 'topic(wdir())' | |
754 9: fran | |
755 $ tlog 'topic(nonsense)' | |
756 abort: unknown revision 'nonsense'! | |
757 [255] | |
758 | |
759 Pattern matching in topic() revset | |
760 $ tlog 'topic("re:nonsense")' | |
761 $ tlog 'topic("literal:nonsense")' | |
762 abort: topic 'nonsense' does not exist! | |
763 [255] | |
764 | |
735 Deactivate the topic. | 765 Deactivate the topic. |
736 $ hg topics | 766 $ hg topics |
737 * fran (1 changesets) | 767 * fran (1 changesets) |
738 $ hg topics --clear | 768 $ hg topics --clear |
769 $ hg log -r 'topic(wdir())' | |
739 $ echo fran? >> beta | 770 $ echo fran? >> beta |
740 $ hg ci -m 'fran?' | 771 $ hg ci -m 'fran?' |
741 created new head | 772 created new head |
742 (consider using topic for lightweight branches. See 'hg help topic') | 773 (consider using topic for lightweight branches. See 'hg help topic') |
743 $ hg log -Gr 'draft()' | 774 $ hg log -Gr 'draft()' |
756 | | 787 | |
757 | 788 |
758 $ hg topics | 789 $ hg topics |
759 fran (1 changesets) | 790 fran (1 changesets) |
760 | 791 |
761 Testing for updating to t0 | 792 Testing for updating to s0 |
762 ========================== | 793 ========================== |
763 | 794 |
764 $ hg up fran | 795 $ hg up fran |
765 switching to topic fran | 796 switching to topic fran |
766 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 797 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
767 $ hg stack | 798 $ hg stack |
768 ### topic: fran | 799 ### topic: fran |
769 ### target: default (branch), ambiguous rebase destination - branch 'default' has 2 heads | 800 ### target: default (branch), ambiguous rebase destination - branch 'default' has 2 heads |
770 t1@ start on fran (current) | 801 s1@ start on fran (current) |
771 t0^ Add file delta (base) | 802 s0^ Add file delta (base) |
772 | 803 |
773 $ hg up t0 | 804 $ hg up s0 |
774 preserving the current topic 'fran' | 805 preserving the current topic 'fran' |
775 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 806 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
776 | 807 |
777 $ hg topic | 808 $ hg topic |
778 * fran (1 changesets) | 809 * fran (1 changesets) |
779 $ hg stack | 810 $ hg stack |
780 ### topic: fran | 811 ### topic: fran |
781 ### target: default (branch), ambiguous rebase destination - branch 'default' has 2 heads | 812 ### target: default (branch), ambiguous rebase destination - branch 'default' has 2 heads |
782 t1: start on fran | 813 s1: start on fran |
783 t0^ Add file delta (base current) | 814 s0^ Add file delta (base current) |
784 | 815 |
785 $ hg topics --age | 816 $ hg topics --age |
786 * fran (1970-01-01 by test) | 817 * fran (1970-01-01 by test) |
787 | 818 |
788 $ cd .. | 819 $ cd .. |