13 > EOF |
13 > EOF |
14 |
14 |
15 $ hg help topics |
15 $ hg help topics |
16 hg topics [TOPIC] |
16 hg topics [TOPIC] |
17 |
17 |
18 View current topic, set current topic, or see all topics. |
18 View current topic, set current topic, change topic for a set of revisions, or |
|
19 see all topics. |
|
20 |
|
21 Clear topic on existing topiced revisions: |
|
22 'hg topic --rev <related revset> --clear' |
|
23 |
|
24 Change topic on some revisions: |
|
25 'hg topic <newtopicname> --rev <related revset>' |
|
26 |
|
27 Clear current topic: |
|
28 'hg topic --clear' |
|
29 |
|
30 Set current topic: |
|
31 'hg topic <topicname>' |
|
32 |
|
33 List of topics: |
|
34 'hg topics' |
|
35 |
|
36 List of topics with their last touched time sorted according to it: |
|
37 'hg topic --age' |
|
38 |
|
39 The active topic (if any) will be prepended with a "*". |
19 |
40 |
20 The --verbose version of this command display various information on the |
41 The --verbose version of this command display various information on the |
21 state of each topic. |
42 state of each topic. |
22 |
43 |
23 options: |
44 options: |
24 |
45 |
25 --clear clear active topic if any |
46 --clear clear active topic if any |
26 -r --rev REV revset of existing revisions |
47 -r --rev REV revset of existing revisions |
27 -l --list show the stack of changeset in the topic |
48 -l --list show the stack of changeset in the topic |
|
49 --age show when you last touched the topics |
28 |
50 |
29 (some details hidden, use --verbose to show complete help) |
51 (some details hidden, use --verbose to show complete help) |
30 $ hg topics |
52 $ hg topics |
31 |
53 |
32 Test topics interaction with evolution: |
54 Test topics interaction with evolution: |
775 | parent: 3:a53952faf762 |
797 | parent: 3:a53952faf762 |
776 | user: test |
798 | user: test |
777 | date: Thu Jan 01 00:00:00 1970 +0000 |
799 | date: Thu Jan 01 00:00:00 1970 +0000 |
778 | summary: start on fran |
800 | summary: start on fran |
779 | |
801 | |
|
802 |
|
803 Testing for updating to t0 |
|
804 ========================== |
|
805 |
|
806 $ hg stack |
|
807 ### topic: changewut (2 heads) |
|
808 ### branch: default, 5 behind |
|
809 t3: fran? |
|
810 t1^ start on fran (base) |
|
811 t2@ gamma (current) |
|
812 t1: start on fran |
|
813 t0^ Add file delta (base) |
|
814 $ hg up t0 |
|
815 preserving the current topic 'changewut' |
|
816 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
817 $ hg topic |
|
818 * changewut |
|
819 $ hg stack |
|
820 ### topic: changewut (2 heads) |
|
821 ### branch: default, 5 behind |
|
822 t3: fran? |
|
823 t1^ start on fran (base) |
|
824 t2: gamma |
|
825 t1: start on fran |
|
826 t0^ Add file delta (base) |
|
827 |
|
828 $ hg topics --age |
|
829 * changewut (1970-01-01) |
|
830 |
|
831 $ cd .. |
|
832 |
|
833 Testing the new config knob to forbid untopiced commit |
|
834 ====================================================== |
|
835 |
|
836 $ hg init ponky |
|
837 $ cd ponky |
|
838 $ cat <<EOF >> .hg/hgrc |
|
839 > [phases] |
|
840 > publish=false |
|
841 > EOF |
|
842 $ cat <<EOF >> $HGRCPATH |
|
843 > [experimental] |
|
844 > enforce-topic = yes |
|
845 > EOF |
|
846 $ touch a b c d |
|
847 $ hg add a |
|
848 $ hg ci -m "Added a" |
|
849 abort: no active topic |
|
850 (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic) |
|
851 [255] |
|
852 |
|
853 (same test, checking we abort before the editor) |
|
854 |
|
855 $ EDITOR=cat hg ci -m "Added a" --edit |
|
856 abort: no active topic |
|
857 (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic) |
|
858 [255] |
|
859 $ hg ci -m "added a" --config experimental.enforce-topic=no |
|
860 $ hg log |
|
861 changeset: 0:a154386e50d1 |
|
862 tag: tip |
|
863 user: test |
|
864 date: Thu Jan 01 00:00:00 1970 +0000 |
|
865 summary: added a |
|
866 |
|
867 $ hg topic topic1970 --rev 0 |
|
868 switching to topic topic1970 |
|
869 changed topic on 1 changes |
|
870 $ hg add b |
|
871 $ hg topic topic1990 |
|
872 $ hg ci -m "Added b" --config devel.default-date="631152000 0" |
|
873 $ hg add c |
|
874 $ hg topic topic2010 |
|
875 $ hg ci -m "Added c" --config devel.default-date="1262304000 0" |
|
876 $ hg log |
|
877 changeset: 3:9048b194797d |
|
878 tag: tip |
|
879 topic: topic2010 |
|
880 user: test |
|
881 date: Fri Jan 01 00:00:00 2010 +0000 |
|
882 summary: Added c |
|
883 |
|
884 changeset: 2:186d493c7f8d |
|
885 topic: topic1990 |
|
886 user: test |
|
887 date: Mon Jan 01 00:00:00 1990 +0000 |
|
888 summary: Added b |
|
889 |
|
890 changeset: 1:e5a30a141954 |
|
891 topic: topic1970 |
|
892 parent: -1:000000000000 |
|
893 user: test |
|
894 date: Thu Jan 01 00:00:00 1970 +0000 |
|
895 summary: added a |
|
896 |
|
897 $ hg topics |
|
898 topic1970 |
|
899 topic1990 |
|
900 * topic2010 |
|
901 $ hg topics --age |
|
902 * topic2010 (2010-01-01) |
|
903 topic1990 (1990-01-01) |
|
904 topic1970 (1970-01-01) |
|
905 $ hg up topic1970 |
|
906 switching to topic topic1970 |
|
907 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
908 $ hg topics --age |
|
909 topic2010 (2010-01-01) |
|
910 topic1990 (1990-01-01) |
|
911 * topic1970 (1970-01-01) |
|
912 |
|
913 $ cd .. |