annotate tests/test-topic-mode.t @ 3634:a9fed41c6bed

tests: add more tests for solving phase-divergence using `hg evolve` This patch adds more tests for resolving phase-divergence caused due to fold or split using `hg evolve` command. The resolution in case of split is not very good and will be fixed in upcoming patches
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 28 Mar 2018 12:56:35 +0530
parents f06c86fd2ffd
children 1bc4b0807c37
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
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
3 Testing the config knob to forbid untopiced commit
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
4 ======================================================
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
5
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
6 $ hg init $TESTTMP/untopic-commit
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
7 $ cd $TESTTMP/untopic-commit
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
8 $ cat <<EOF >> .hg/hgrc
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
9 > [phases]
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
10 > publish=false
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
11 > EOF
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
12 $ cat <<EOF >> $HGRCPATH
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
13 > [experimental]
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
14 > topic-mode = enforce
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
15 > EOF
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
16 $ touch a b c d
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
17 $ hg add a
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
18 $ hg ci -m "Added a"
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
19 abort: no active topic
3027
b220e2f5ebd5 topic: update the topic-mode hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3025
diff changeset
20 (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
21 [255]
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
22
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
23 (same test, checking we abort before the editor)
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
24
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
25 $ EDITOR=cat hg ci -m "Added a" --edit
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
26 abort: no active topic
3027
b220e2f5ebd5 topic: update the topic-mode hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3025
diff changeset
27 (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
28 [255]
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
29 $ 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
30 $ hg log
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
31 changeset: 0:a154386e50d1
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
32 tag: tip
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
33 user: test
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
34 date: Thu Jan 01 00:00:00 1970 +0000
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
35 summary: added a
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
36
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
37
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
38 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
39 ==========================================================
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 $ hg init $TESTTMP/untopic-warn-commit
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
42 $ cd $TESTTMP/untopic-warn-commit
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
43 $ cat <<EOF >> .hg/hgrc
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
44 > [phases]
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
45 > publish=false
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
46 > EOF
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
47 $ cat <<EOF >> $HGRCPATH
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
48 > [experimental]
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
49 > topic-mode = warning
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
50 > EOF
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
51 $ touch a b c d
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
52 $ hg add a
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
53
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
54 (same test, checking we abort before the editor)
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
55
3097
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
56 $ HGEDITOR=cat hg ci -m "Added a" --edit
3023
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
57 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
58 (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
59 Added a
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
60
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
61
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
62 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
63 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
64 HG: --
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
65 HG: user: test
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
66 HG: branch 'default'
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
67 HG: 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 $ 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
70 Added a
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
71
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
72
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
73 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
74 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
75 HG: --
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
76 HG: user: test
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
77 HG: branch 'default'
f06c86fd2ffd topic: do to check to topic while amending
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3096
diff changeset
78 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
79 $ 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
80 $ hg log
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
81 changeset: 2:2e862d8b5eff
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
82 tag: tip
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
83 parent: -1:000000000000
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
84 user: test
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
85 date: Thu Jan 01 00:00:00 1970 +0000
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
86 summary: added a'
cc740c545776 topicmode: add new warning topicmode
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
87
3024
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
88
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
89 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
90 ================================================================
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
91
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
92 $ 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
93 $ 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
94 $ cat <<EOF >> .hg/hgrc
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
95 > [phases]
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
96 > publish=false
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
97 > EOF
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
98 $ cat <<EOF >> $HGRCPATH
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
99 > [experimental]
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
100 > topic-mode = enforce
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
101 > EOF
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
102 $ touch ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
103 $ 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
104 adding ROOT
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
105 $ touch a
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
106 $ hg add a
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
107 $ hg topic mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
108 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
109 $ 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
110 active topic 'mytopic' grew its first changeset
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 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
113 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
114 $ touch default
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
115 $ 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
116 $ 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
117
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
118 $ hg merge mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
119 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
120 (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
121 $ 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
122 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
123 (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
124
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
125 $ hg log -G
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
126 @ changeset: 3:676a445d1c09
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
127 |\ tag: tip
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
128 | | parent: 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: 1:e5b6c632bd8e
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: merge mytopic
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: 2:a4da109ee59f
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
135 | | parent: 0:ec1d2790416d
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: default
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: 1:e5b6c632bd8e
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
141 |/ topic: mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
142 | user: test
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
143 | 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
144 | summary: Added a
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
145 |
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
146 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
147 user: test
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
148 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
149 summary: ROOT
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
150
3025
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
151
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
152 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
153 ================================================================
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
154
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
155 $ 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
156 $ 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
157 $ cat <<EOF >> .hg/hgrc
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
158 > [phases]
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
159 > publish=false
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
160 > EOF
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
161 $ cat <<EOF >> $HGRCPATH
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
162 > [experimental]
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
163 > topic-mode = enforce-all
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
164 > EOF
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
165 $ touch ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
166 $ 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
167 adding ROOT
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
168 $ touch a
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
169 $ hg add a
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
170 $ hg topic mytopic
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
171 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
172 $ hg ci -m "Added a"
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
173 active topic 'mytopic' grew its first changeset
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
174
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
175 $ hg up -r "desc('ROOT')"
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
176 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
177 $ touch default
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
178 $ 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
179 $ 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
180
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
181 $ hg merge mytopic
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
182 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
183 (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
184 $ hg commit -m "merge mytopic"
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
185 abort: no active topic
3027
b220e2f5ebd5 topic: update the topic-mode hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3025
diff changeset
186 (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
187 [255]
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
188
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
189 $ hg log -G
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
190 @ changeset: 2:a4da109ee59f
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
191 | tag: tip
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
192 | parent: 0:ec1d2790416d
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
193 | user: test
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
194 | 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
195 | summary: default
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
196 |
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
197 | @ changeset: 1:e5b6c632bd8e
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
198 |/ topic: mytopic
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
199 | user: test
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
200 | 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
201 | summary: Added a
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
202 |
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
203 o changeset: 0:ec1d2790416d
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
204 user: test
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
205 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
206 summary: ROOT
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
207
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
208 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
209 ====================================================================
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
210
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
211 $ hg init $TESTTMP/test-untopic-random
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
212 $ cd $TESTTMP/test-untopic-random
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
213 $ cat <<EOF >> .hg/hgrc
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
214 > [phases]
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
215 > publish=false
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
216 > EOF
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
217 $ cat <<EOF >> $HGRCPATH
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
218 > [experimental]
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
219 > topic-mode = random
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
220 > EOF
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 ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
223 $ 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
224 adding ROOT
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
225
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
226 $ touch A
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
227 $ hg add A
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
228 $ hg commit -m "Add A" --config devel.randomseed=42
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
229 active topic 'panoramic-antelope' grew its first changeset
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
230
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
231 $ hg up -r "desc(ROOT)"
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
232 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
233
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
234 $ touch B
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
235 $ hg add B
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
236 $ 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
237 active topic 'various-dove' grew its first changeset
3030
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
238
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
239 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
240
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
241 $ 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
242 active topic 'various-dove' is now empty
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
243 $ hg up default
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
244 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
245 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
246 $ hg log -G
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
247 @ changeset: 2:2d2acb6efad5
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
248 | tag: tip
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
249 | parent: 0:ec1d2790416d
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
250 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
251 | 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
252 | summary: Add B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
253 |
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
254 | o changeset: 1:d4b548f35972
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
255 |/ topic: panoramic-antelope
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
256 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
257 | 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
258 | summary: Add A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
259 |
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
260 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
261 user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
262 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
263 summary: ROOT
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
264
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
265 $ hg merge panoramic-antelope
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
266 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
267 (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
268 $ hg ci -m 'merge'
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
269 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
270 =================================================================================
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
271
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
272 $ 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
273 $ 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
274 $ cat <<EOF >> .hg/hgrc
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
275 > [phases]
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
276 > publish=false
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
277 > EOF
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
278 $ cat <<EOF >> $HGRCPATH
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
279 > [experimental]
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
280 > 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
281 > EOF
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 ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
284 $ 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
285 adding ROOT
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
286
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
287 $ touch A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
288 $ hg add A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
289 $ hg commit -m "Add A" --config devel.randomseed=42
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
290 active topic 'panoramic-antelope' grew its first changeset
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
291
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
292 $ 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
293 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
294
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
295 $ touch B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
296 $ hg add B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
297 $ 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
298 active topic 'various-dove' grew its first changeset
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
299
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
300 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
301
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
302 $ 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
303 active topic 'various-dove' is now empty
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
304 $ hg up default
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
305 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
306 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
307 $ hg log -G
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
308 @ changeset: 2:2d2acb6efad5
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
309 | tag: tip
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
310 | parent: 0:ec1d2790416d
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
311 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
312 | 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
313 | summary: Add B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
314 |
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
315 | o changeset: 1:d4b548f35972
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
316 |/ topic: panoramic-antelope
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
317 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
318 | 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
319 | summary: Add A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
320 |
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
321 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
322 user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
323 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
324 summary: ROOT
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
325
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
326 $ hg merge panoramic-antelope
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
327 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
328 (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
329 $ 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
330 active topic 'omniscient-locust' grew its first changeset