annotate tests/test-topic-mode.t @ 4636:c0e9a3c01c44

evolve: consider using three way merge to get the user for div resolution This patch adds the logic to merge the users from two divergent csets considering the base (i.e three way merge). The case when all the three are different, we concatenate the two authors of divergent csets.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Sun, 05 May 2019 18:24:59 +0530
parents eb928f5728c4
children f3713d41b85b dd68ce259708
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
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
111 (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
112
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
113 $ 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
114 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
115 $ touch default
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
116 $ 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
117 $ 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
118
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
119 $ hg merge mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
120 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
121 (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
122 $ 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
123 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
124 (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
125
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
126 $ hg log -G
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
127 @ changeset: 3:676a445d1c09
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
128 |\ tag: tip
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
129 | | parent: 2:a4da109ee59f
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
130 | | parent: 1:e5b6c632bd8e
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
131 | | user: test
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
132 | | 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
133 | | summary: merge mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
134 | |
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
135 | 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
136 | | parent: 0:ec1d2790416d
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
137 | | user: test
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
138 | | 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
139 | | summary: default
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
140 | |
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
141 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
142 |/ topic: mytopic
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
143 | user: test
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
144 | 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
145 | summary: Added a
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
146 |
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
147 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
148 user: test
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
149 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
150 summary: ROOT
89855920fb0f topicmode: 'enforce' topic mode, no longer warn about untopiced merge
Boris Feld <boris.feld@octobus.net>
parents: 3023
diff changeset
151
3025
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
152
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
153 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
154 ================================================================
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
155
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
156 $ 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
157 $ 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
158 $ cat <<EOF >> .hg/hgrc
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
159 > [phases]
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
160 > publish=false
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
161 > EOF
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
162 $ cat <<EOF >> $HGRCPATH
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
163 > [experimental]
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
164 > topic-mode = enforce-all
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
165 > EOF
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
166 $ touch ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
167 $ 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
168 adding ROOT
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
169 $ touch a
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
170 $ hg add a
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
171 $ hg topic mytopic
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
172 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
173 $ hg ci -m "Added a"
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
174 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
175 (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
176
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
177 $ hg up -r "desc('ROOT')"
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
178 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
179 $ touch default
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
180 $ 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
181 $ 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
182
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
183 $ hg merge mytopic
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
184 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
185 (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
186 $ hg commit -m "merge mytopic"
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
187 abort: no active topic
3027
b220e2f5ebd5 topic: update the topic-mode hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3025
diff changeset
188 (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
189 [255]
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
190
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
191 $ hg log -G
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
192 @ changeset: 2:a4da109ee59f
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
193 | tag: tip
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
194 | parent: 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: default
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
198 |
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
199 | @ changeset: 1:e5b6c632bd8e
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
200 |/ topic: mytopic
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
201 | user: test
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
202 | 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
203 | summary: Added a
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
204 |
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
205 o changeset: 0:ec1d2790416d
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
206 user: test
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
207 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
208 summary: ROOT
e814c553ef32 topic: add a 'enforce-all' mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3024
diff changeset
209
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
210 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
211 ====================================================================
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 $ hg init $TESTTMP/test-untopic-random
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
214 $ cd $TESTTMP/test-untopic-random
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
215 $ cat <<EOF >> .hg/hgrc
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
216 > [phases]
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
217 > publish=false
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
218 > EOF
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
219 $ cat <<EOF >> $HGRCPATH
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
220 > [experimental]
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
221 > topic-mode = random
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
222 > EOF
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
223
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
224 $ touch ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
225 $ 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
226 adding ROOT
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
227
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
228 $ touch A
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
229 $ hg add A
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
230 $ 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
231 active topic 'panoramic-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
232 (see 'hg help topics' for more information)
3028
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 $ hg up -r "desc(ROOT)"
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
235 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
236
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
237 $ touch B
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
238 $ hg add B
c2d1f49ac7e2 topicmode: add 'random' topic mode
Boris Feld <boris.feld@octobus.net>
parents: 3027
diff changeset
239 $ 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
240 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
241 (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
242
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
243 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
244
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
245 $ 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
246 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
247 (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
248 $ hg up default
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
249 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
250 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
251 $ hg log -G
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
252 @ changeset: 2:2d2acb6efad5
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
253 | tag: tip
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
254 | parent: 0:ec1d2790416d
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
255 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
256 | 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
257 | summary: Add B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
258 |
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
259 | 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
260 |/ topic: panoramic-antelope
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: Add A
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 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
266 user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
267 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
268 summary: ROOT
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 $ 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
271 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
272 (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
273 $ 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
274 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
275 =================================================================================
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
276
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
277 $ 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
278 $ 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
279 $ 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
280 > [phases]
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
281 > publish=false
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
282 > EOF
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
283 $ cat <<EOF >> $HGRCPATH
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
284 > [experimental]
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
285 > 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
286 > EOF
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
287
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
288 $ touch ROOT
3031
b400759fd6d2 test: small cleanup in test-topic-mode.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3030
diff changeset
289 $ 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
290 adding ROOT
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 $ touch A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
293 $ hg add A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
294 $ 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
295 active topic 'panoramic-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
296 (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
297
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
298 $ 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
299 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
300
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
301 $ touch B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
302 $ hg add B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
303 $ 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
304 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
305 (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
306
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
307 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
308
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
309 $ 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
310 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
311 (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
312 $ hg up default
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
313 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
314 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
315 $ hg log -G
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
316 @ changeset: 2:2d2acb6efad5
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
317 | tag: tip
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
318 | parent: 0:ec1d2790416d
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
319 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
320 | 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
321 | summary: Add B
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
322 |
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
323 | 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
324 |/ topic: panoramic-antelope
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
325 | user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
326 | 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
327 | summary: Add A
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
328 |
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
329 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
330 user: test
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
331 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
332 summary: ROOT
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
333
581a6b9d2c8c test: add support for random-all topic mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3029
diff changeset
334 $ 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
335 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
336 (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
337 $ 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
338 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
339 (see 'hg help topics' for more information)