annotate tests/test-topic-mode.t @ 6222:6020b7e92a86

topic: update topic() revset docstring, mention hg help I was curious why we don't support glob patterns, only re. But turns out it's like this in upstream (e.g. branch revset) as well, so let's point to the relevant help page.
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 08 Apr 2022 02:19:50 +0300
parents 1a33b31ad9a3
children 68c67d53bb14
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
1 $ . "$TESTDIR/testlib/topic_setup.sh"
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
2
6212
1a33b31ad9a3 tests: move publish=false to the top of test-topic-mode.t since it's common
Anton Shestakov <av6@dwimlabs.net>
parents: 4813
diff changeset
3 $ cat <<EOF >> $HGRCPATH
1a33b31ad9a3 tests: move publish=false to the top of test-topic-mode.t since it's common
Anton Shestakov <av6@dwimlabs.net>
parents: 4813
diff changeset
4 > [phases]
1a33b31ad9a3 tests: move publish=false to the top of test-topic-mode.t since it's common
Anton Shestakov <av6@dwimlabs.net>
parents: 4813
diff changeset
5 > publish = false
1a33b31ad9a3 tests: move publish=false to the top of test-topic-mode.t since it's common
Anton Shestakov <av6@dwimlabs.net>
parents: 4813
diff changeset
6 > EOF
1a33b31ad9a3 tests: move publish=false to the top of test-topic-mode.t since it's common
Anton Shestakov <av6@dwimlabs.net>
parents: 4813
diff changeset
7
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
8 Testing the config knob to forbid untopiced commit
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
9 ======================================================
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
10
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
11 $ hg init $TESTTMP/untopic-commit
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
12 $ cd $TESTTMP/untopic-commit
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
13 $ cat <<EOF >> $HGRCPATH
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
14 > [experimental]
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
15 > topic-mode = enforce
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
16 > EOF
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
17 $ touch a b c d
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
18 $ hg add a
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
19 $ hg ci -m "Added a"
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
20 abort: no active topic
3027
b220e2f5ebd5 topic: update the topic-mode hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3025
diff changeset
21 (see 'hg help -e topic.topic-mode' for details)
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
22 [255]
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
23
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
24 (same test, checking we abort before the editor)
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
25
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
26 $ EDITOR=cat hg ci -m "Added a" --edit
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
27 abort: no active topic
3027
b220e2f5ebd5 topic: update the topic-mode hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3025
diff changeset
28 (see 'hg help -e topic.topic-mode' for details)
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
29 [255]
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
30 $ hg ci -m "added a" --config experimental.topic-mode=ignore
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
31 $ hg log
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
32 changeset: 0:a154386e50d1
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
33 tag: tip
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
34 user: test
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
35 date: Thu Jan 01 00:00:00 1970 +0000
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
36 summary: added a
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
37
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
38
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
39 Testing the config knob to warn about untopiced commit
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
40 ==========================================================
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
41
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
42 $ hg init $TESTTMP/untopic-warn-commit
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
43 $ cd $TESTTMP/untopic-warn-commit
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
44 $ cat <<EOF >> $HGRCPATH
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
45 > [experimental]
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
46 > topic-mode = warning
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
47 > EOF
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
48 $ touch a b c d
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
49 $ hg add a
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
50
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
51 (same test, checking we abort before the editor)
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
52
3097
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
53 $ HGEDITOR=cat hg ci -m "Added a" --edit
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
54 warning: new draft commit without topic
3096
c458c0856ee5 topic-mode: add missing end line in topic-mode warning
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3031
diff changeset
55 (see 'hg help -e topic.topic-mode' for details)
3097
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
56 Added a
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
57
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
58
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
59 HG: Enter commit message. Lines beginning with 'HG:' are removed.
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
60 HG: Leave message empty to abort commit.
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
61 HG: --
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
62 HG: user: test
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
63 HG: branch 'default'
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
64 HG: added a
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
65
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
66 $ HGEDITOR=cat hg ci --amend -m "Added a" --edit
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
67 Added a
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
68
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
69
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
70 HG: Enter commit message. Lines beginning with 'HG:' are removed.
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
71 HG: Leave message empty to abort commit.
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
72 HG: --
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
73 HG: user: test
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
74 HG: branch 'default'
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
75 HG: added a
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
76 $ hg ci --amend -m "added a'" --config experimental.topic-mode=ignore
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
77 $ hg log
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
78 changeset: 2:2e862d8b5eff
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
79 tag: tip
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
80 parent: -1:000000000000
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
81 user: test
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
82 date: Thu Jan 01 00:00:00 1970 +0000
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
83 summary: added a'
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
84
3024
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
85
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
86 Testing the config knob to warn about untopiced merge commit
3024
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
87 ================================================================
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
88
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
89 $ hg init $TESTTMP/test-untopic-merge-commit
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
90 $ cd $TESTTMP/test-untopic-merge-commit
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
91 $ cat <<EOF >> $HGRCPATH
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
92 > [experimental]
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
93 > topic-mode = enforce
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
94 > EOF
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
95 $ touch ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
96 $ hg commit -A -m "ROOT" --config experimental.topic-mode=ignore
3024
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
97 adding ROOT
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
98 $ touch a
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
99 $ hg add a
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
100 $ hg topic mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
101 marked working directory as topic: mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
102 $ hg ci -m "Added a"
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
103 active topic 'mytopic' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3097
diff changeset
104 (see 'hg help topics' for more information)
3024
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
105
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
106 $ hg up -r "desc('ROOT')"
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
107 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
108 $ touch default
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
109 $ hg add default
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
110 $ hg commit -m "default" --config experimental.topic-mode=ignore
3024
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
111
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
112 $ hg merge mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
114 (branch merge, don't forget to commit)
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
115 $ hg commit -m "merge mytopic"
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
116 warning: new draft commit without topic
3096
c458c0856ee5 topic-mode: add missing end line in topic-mode warning
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3031
diff changeset
117 (see 'hg help -e topic.topic-mode' for details)
3024
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
118
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
119 $ hg log -G
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
120 @ changeset: 3:676a445d1c09
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
121 |\ tag: tip
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
122 | | parent: 2:a4da109ee59f
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
123 | | parent: 1:e5b6c632bd8e
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
124 | | user: test
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
125 | | date: Thu Jan 01 00:00:00 1970 +0000
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
126 | | summary: merge mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
127 | |
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
128 | o changeset: 2:a4da109ee59f
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
129 | | parent: 0:ec1d2790416d
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
130 | | user: test
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
131 | | date: Thu Jan 01 00:00:00 1970 +0000
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
132 | | summary: default
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
133 | |
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
134 o | changeset: 1:e5b6c632bd8e
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
135 |/ topic: mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
136 | user: test
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
137 | date: Thu Jan 01 00:00:00 1970 +0000
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
138 | summary: Added a
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
139 |
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
140 o changeset: 0:ec1d2790416d
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
141 user: test
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
142 date: Thu Jan 01 00:00:00 1970 +0000
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
143 summary: ROOT
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
144
3025
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
145
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
146 Testing the config knob to about on untopiced merge commit
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
147 ================================================================
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
148
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
149 $ hg init $TESTTMP/test-untopic-merge-commit-abort
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
150 $ cd $TESTTMP/test-untopic-merge-commit-abort
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
151 $ cat <<EOF >> $HGRCPATH
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
152 > [experimental]
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
153 > topic-mode = enforce-all
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
154 > EOF
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
155 $ touch ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
156 $ hg commit -A -m "ROOT" --config experimental.topic-mode=ignore
3025
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
157 adding ROOT
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
158 $ touch a
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
159 $ hg add a
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
160 $ hg topic mytopic
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
161 marked working directory as topic: mytopic
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
162 $ hg ci -m "Added a"
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
163 active topic 'mytopic' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3097
diff changeset
164 (see 'hg help topics' for more information)
3025
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
165
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
166 $ hg up -r "desc('ROOT')"
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
167 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
168 $ touch default
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
169 $ hg add default
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
170 $ hg commit -m "default" --config experimental.topic-mode=ignore
3025
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
171
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
172 $ hg merge mytopic
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
173 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
174 (branch merge, don't forget to commit)
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
175 $ hg commit -m "merge mytopic"
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
176 abort: no active topic
3027
b220e2f5ebd5 topic: update the topic-mode hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3025
diff changeset
177 (see 'hg help -e topic.topic-mode' for details)
3025
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
178 [255]
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
179
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
180 $ hg log -G
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
181 @ changeset: 2:a4da109ee59f
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
182 | tag: tip
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
183 | parent: 0:ec1d2790416d
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
184 | user: test
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
185 | date: Thu Jan 01 00:00:00 1970 +0000
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
186 | summary: default
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
187 |
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
188 | @ changeset: 1:e5b6c632bd8e
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
189 |/ topic: mytopic
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
190 | user: test
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
191 | date: Thu Jan 01 00:00:00 1970 +0000
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
192 | summary: Added a
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
193 |
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
194 o changeset: 0:ec1d2790416d
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
195 user: test
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
196 date: Thu Jan 01 00:00:00 1970 +0000
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
197 summary: ROOT
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
198
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
199 Testing the config knob to use a random topic for untopic commit
3028
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
200 ====================================================================
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
201
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
202 $ hg init $TESTTMP/test-untopic-random
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
203 $ cd $TESTTMP/test-untopic-random
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
204 $ cat <<EOF >> $HGRCPATH
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
205 > [experimental]
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
206 > topic-mode = random
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
207 > EOF
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
208
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
209 $ touch ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
210 $ hg commit -A -m "ROOT" --config experimental.topic-mode=ignore
3028
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
211 adding ROOT
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
212
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
213 $ touch A
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
214 $ hg add A
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
215 $ hg commit -m "Add A" --config devel.randomseed=42
4813
dd68ce259708 topic: add a new random attribute
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
216 active topic 'palatial-antelope' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3097
diff changeset
217 (see 'hg help topics' for more information)
3028
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
218
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
219 $ hg up -r "desc(ROOT)"
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
220 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
221
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
222 $ touch B
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
223 $ hg add B
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
224 $ hg commit -m "Add B" --config devel.randomseed=128
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
225 active topic 'various-dove' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3097
diff changeset
226 (see 'hg help topics' for more information)
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
227
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
228 Test a merge too
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
229
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
230 $ hg phase --public -r .
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
231 active topic 'various-dove' is now empty
3770
eb928f5728c4 topic: suggest to clear a topic that becomes empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3769
diff changeset
232 (use 'hg topic --clear' to clear it if needed)
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
233 $ hg up default
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
234 clearing empty topic "various-dove"
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
235 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
236 $ hg log -G
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
237 @ changeset: 2:2d2acb6efad5
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
238 | tag: tip
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
239 | parent: 0:ec1d2790416d
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
240 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
241 | date: Thu Jan 01 00:00:00 1970 +0000
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
242 | summary: Add B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
243 |
4813
dd68ce259708 topic: add a new random attribute
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
244 | o changeset: 1:d502ab6d9d91
dd68ce259708 topic: add a new random attribute
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
245 |/ topic: palatial-antelope
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
246 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
247 | date: Thu Jan 01 00:00:00 1970 +0000
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
248 | summary: Add A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
249 |
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
250 o changeset: 0:ec1d2790416d
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
251 user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
252 date: Thu Jan 01 00:00:00 1970 +0000
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
253 summary: ROOT
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
254
4813
dd68ce259708 topic: add a new random attribute
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
255 $ hg merge palatial-antelope
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
256 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
257 (branch merge, don't forget to commit)
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
258 $ hg ci -m 'merge'
6212
1a33b31ad9a3 tests: move publish=false to the top of test-topic-mode.t since it's common
Anton Shestakov <av6@dwimlabs.net>
parents: 4813
diff changeset
259
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
260 Testing the config knob to use a random topic for untopic commit (even for merge)
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
261 =================================================================================
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
262
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
263 $ hg init $TESTTMP/test-untopic-random-all
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
264 $ cd $TESTTMP/test-untopic-random-all
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
265 $ cat <<EOF >> $HGRCPATH
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
266 > [experimental]
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
267 > topic-mode = random-all
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
268 > EOF
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
269
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
270 $ touch ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
271 $ hg commit -A -m "ROOT" --config experimental.topic-mode=ignore
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
272 adding ROOT
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
273
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
274 $ touch A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
275 $ hg add A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
276 $ hg commit -m "Add A" --config devel.randomseed=42
4813
dd68ce259708 topic: add a new random attribute
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
277 active topic 'palatial-antelope' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3097
diff changeset
278 (see 'hg help topics' for more information)
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
279
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
280 $ hg up -r "desc(ROOT)"
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
281 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
282
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
283 $ touch B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
284 $ hg add B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
285 $ hg commit -m "Add B" --config devel.randomseed=128
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
286 active topic 'various-dove' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3097
diff changeset
287 (see 'hg help topics' for more information)
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
288
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
289 Test a merge too
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
290
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
291 $ hg phase --public -r .
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
292 active topic 'various-dove' is now empty
3770
eb928f5728c4 topic: suggest to clear a topic that becomes empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3769
diff changeset
293 (use 'hg topic --clear' to clear it if needed)
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
294 $ hg up default
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
295 clearing empty topic "various-dove"
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
296 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
297 $ hg log -G
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
298 @ changeset: 2:2d2acb6efad5
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
299 | tag: tip
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
300 | parent: 0:ec1d2790416d
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
301 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
302 | date: Thu Jan 01 00:00:00 1970 +0000
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
303 | summary: Add B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
304 |
4813
dd68ce259708 topic: add a new random attribute
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
305 | o changeset: 1:d502ab6d9d91
dd68ce259708 topic: add a new random attribute
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
306 |/ topic: palatial-antelope
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
307 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
308 | date: Thu Jan 01 00:00:00 1970 +0000
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
309 | summary: Add A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
310 |
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
311 o changeset: 0:ec1d2790416d
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
312 user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
313 date: Thu Jan 01 00:00:00 1970 +0000
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
314 summary: ROOT
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
315
4813
dd68ce259708 topic: add a new random attribute
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
316 $ hg merge palatial-antelope
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
317 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
318 (branch merge, don't forget to commit)
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
319 $ hg ci -m 'merge' --config devel.randomseed=1337
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
320 active topic 'omniscient-locust' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3097
diff changeset
321 (see 'hg help topics' for more information)