comparison tests/test-topic-mode.t @ 6212:1a33b31ad9a3

tests: move publish=false to the top of test-topic-mode.t since it's common
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 12 Dec 2021 17:19:12 +0300
parents dd68ce259708
children 68c67d53bb14
comparison
equal deleted inserted replaced
6209:ff6ea5afba0e 6212:1a33b31ad9a3
1 $ . "$TESTDIR/testlib/topic_setup.sh" 1 $ . "$TESTDIR/testlib/topic_setup.sh"
2
3 $ cat <<EOF >> $HGRCPATH
4 > [phases]
5 > publish = false
6 > EOF
2 7
3 Testing the config knob to forbid untopiced commit 8 Testing the config knob to forbid untopiced commit
4 ====================================================== 9 ======================================================
5 10
6 $ hg init $TESTTMP/untopic-commit 11 $ hg init $TESTTMP/untopic-commit
7 $ cd $TESTTMP/untopic-commit 12 $ cd $TESTTMP/untopic-commit
8 $ cat <<EOF >> .hg/hgrc
9 > [phases]
10 > publish=false
11 > EOF
12 $ cat <<EOF >> $HGRCPATH 13 $ cat <<EOF >> $HGRCPATH
13 > [experimental] 14 > [experimental]
14 > topic-mode = enforce 15 > topic-mode = enforce
15 > EOF 16 > EOF
16 $ touch a b c d 17 $ touch a b c d
38 Testing the config knob to warn about untopiced commit 39 Testing the config knob to warn about untopiced commit
39 ========================================================== 40 ==========================================================
40 41
41 $ hg init $TESTTMP/untopic-warn-commit 42 $ hg init $TESTTMP/untopic-warn-commit
42 $ cd $TESTTMP/untopic-warn-commit 43 $ cd $TESTTMP/untopic-warn-commit
43 $ cat <<EOF >> .hg/hgrc
44 > [phases]
45 > publish=false
46 > EOF
47 $ cat <<EOF >> $HGRCPATH 44 $ cat <<EOF >> $HGRCPATH
48 > [experimental] 45 > [experimental]
49 > topic-mode = warning 46 > topic-mode = warning
50 > EOF 47 > EOF
51 $ touch a b c d 48 $ touch a b c d
89 Testing the config knob to warn about untopiced merge commit 86 Testing the config knob to warn about untopiced merge commit
90 ================================================================ 87 ================================================================
91 88
92 $ hg init $TESTTMP/test-untopic-merge-commit 89 $ hg init $TESTTMP/test-untopic-merge-commit
93 $ cd $TESTTMP/test-untopic-merge-commit 90 $ cd $TESTTMP/test-untopic-merge-commit
94 $ cat <<EOF >> .hg/hgrc
95 > [phases]
96 > publish=false
97 > EOF
98 $ cat <<EOF >> $HGRCPATH 91 $ cat <<EOF >> $HGRCPATH
99 > [experimental] 92 > [experimental]
100 > topic-mode = enforce 93 > topic-mode = enforce
101 > EOF 94 > EOF
102 $ touch ROOT 95 $ touch ROOT
153 Testing the config knob to about on untopiced merge commit 146 Testing the config knob to about on untopiced merge commit
154 ================================================================ 147 ================================================================
155 148
156 $ hg init $TESTTMP/test-untopic-merge-commit-abort 149 $ hg init $TESTTMP/test-untopic-merge-commit-abort
157 $ cd $TESTTMP/test-untopic-merge-commit-abort 150 $ cd $TESTTMP/test-untopic-merge-commit-abort
158 $ cat <<EOF >> .hg/hgrc
159 > [phases]
160 > publish=false
161 > EOF
162 $ cat <<EOF >> $HGRCPATH 151 $ cat <<EOF >> $HGRCPATH
163 > [experimental] 152 > [experimental]
164 > topic-mode = enforce-all 153 > topic-mode = enforce-all
165 > EOF 154 > EOF
166 $ touch ROOT 155 $ touch ROOT
210 Testing the config knob to use a random topic for untopic commit 199 Testing the config knob to use a random topic for untopic commit
211 ==================================================================== 200 ====================================================================
212 201
213 $ hg init $TESTTMP/test-untopic-random 202 $ hg init $TESTTMP/test-untopic-random
214 $ cd $TESTTMP/test-untopic-random 203 $ cd $TESTTMP/test-untopic-random
215 $ cat <<EOF >> .hg/hgrc
216 > [phases]
217 > publish=false
218 > EOF
219 $ cat <<EOF >> $HGRCPATH 204 $ cat <<EOF >> $HGRCPATH
220 > [experimental] 205 > [experimental]
221 > topic-mode = random 206 > topic-mode = random
222 > EOF 207 > EOF
223 208
269 254
270 $ hg merge palatial-antelope 255 $ hg merge palatial-antelope
271 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 256 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
272 (branch merge, don't forget to commit) 257 (branch merge, don't forget to commit)
273 $ hg ci -m 'merge' 258 $ hg ci -m 'merge'
259
274 Testing the config knob to use a random topic for untopic commit (even for merge) 260 Testing the config knob to use a random topic for untopic commit (even for merge)
275 ================================================================================= 261 =================================================================================
276 262
277 $ hg init $TESTTMP/test-untopic-random-all 263 $ hg init $TESTTMP/test-untopic-random-all
278 $ cd $TESTTMP/test-untopic-random-all 264 $ cd $TESTTMP/test-untopic-random-all
279 $ cat <<EOF >> .hg/hgrc
280 > [phases]
281 > publish=false
282 > EOF
283 $ cat <<EOF >> $HGRCPATH 265 $ cat <<EOF >> $HGRCPATH
284 > [experimental] 266 > [experimental]
285 > topic-mode = random-all 267 > topic-mode = random-all
286 > EOF 268 > EOF
287 269