Mercurial > evolve
comparison tests/test-topic-flow-publish-bare.t @ 5947:4cf020149c4a mercurial-4.8
test-compat: merge mercurial-4.9 into mercurial-4.8
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 28 May 2021 00:12:32 +0800 |
parents | 1bb465fad209 fe25ec8f0124 |
children | 6b67f26f4667 |
comparison
equal
deleted
inserted
replaced
5900:14fe42125a7a | 5947:4cf020149c4a |
---|---|
2 Test workflow options | 2 Test workflow options |
3 ===================== | 3 ===================== |
4 | 4 |
5 $ . "$TESTDIR/testlib/topic_setup.sh" | 5 $ . "$TESTDIR/testlib/topic_setup.sh" |
6 $ . "$TESTDIR/testlib/common.sh" | 6 $ . "$TESTDIR/testlib/common.sh" |
7 | |
8 Also testing auto-publish config option with this publishing mode | |
9 | |
10 $ cat << EOF >> "$HGRCPATH" | |
11 > [ui] | |
12 > ssh = "$PYTHON" "$RUNTESTDIR/dummyssh" | |
13 > [experimental] | |
14 > auto-publish = warn | |
15 > [alias] | |
16 > tgl = log --rev 'sort(\$1, "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | |
17 > [extensions] | |
18 > # needed for experimental.auto-publish in hg <= 4.8 | |
19 > evolve = | |
20 > EOF | |
7 | 21 |
8 Publishing of bare branch | 22 Publishing of bare branch |
9 ========================= | 23 ========================= |
10 | 24 |
11 $ hg init bare-branch-server | 25 $ hg init bare-branch-server |
30 | 44 |
31 $ cd bare-client | 45 $ cd bare-client |
32 $ mkcommit c_dB0 | 46 $ mkcommit c_dB0 |
33 $ hg push | 47 $ hg push |
34 pushing to $TESTTMP/bare-branch-server | 48 pushing to $TESTTMP/bare-branch-server |
49 1 changesets about to be published | |
35 searching for changes | 50 searching for changes |
36 adding changesets | 51 adding changesets |
37 adding manifests | 52 adding manifests |
38 adding file changes | 53 adding file changes |
39 added 1 changesets with 1 changes to 1 files | 54 added 1 changesets with 1 changes to 1 files |
40 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | 55 $ hg tgl 'all()' |
41 @ 2:286d02a6e2a2 c_dB0 public default | 56 @ 2:286d02a6e2a2 c_dB0 public default |
42 | | 57 | |
43 o 1:134bc3852ad2 c_dA0 public default | 58 o 1:134bc3852ad2 c_dA0 public default |
44 | | 59 | |
45 o 0:ea207398892e ROOT public default | 60 o 0:ea207398892e ROOT public default |
58 $ mkcommit c_dD0 | 73 $ mkcommit c_dD0 |
59 created new head | 74 created new head |
60 (consider using topic for lightweight branches. See 'hg help topic') | 75 (consider using topic for lightweight branches. See 'hg help topic') |
61 $ hg push -f | 76 $ hg push -f |
62 pushing to $TESTTMP/bare-branch-server | 77 pushing to $TESTTMP/bare-branch-server |
78 2 changesets about to be published | |
63 searching for changes | 79 searching for changes |
64 adding changesets | 80 adding changesets |
65 adding manifests | 81 adding manifests |
66 adding file changes | 82 adding file changes |
67 added 2 changesets with 2 changes to 2 files (+2 heads) | 83 added 2 changesets with 2 changes to 2 files (+2 heads) |
68 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | 84 $ hg tgl 'all()' |
69 @ 4:9bf953aa81f6 c_dD0 public default | 85 @ 4:9bf953aa81f6 c_dD0 public default |
70 | | 86 | |
71 | o 3:9d5b8e1f08a4 c_dC0 public default | 87 | o 3:9d5b8e1f08a4 c_dC0 public default |
72 |/ | 88 |/ |
73 | o 2:286d02a6e2a2 c_dB0 public default | 89 | o 2:286d02a6e2a2 c_dB0 public default |
86 marked working directory as branch branchA | 102 marked working directory as branch branchA |
87 (branches are permanent and global, did you want a bookmark?) | 103 (branches are permanent and global, did you want a bookmark?) |
88 $ mkcommit c_aE0 | 104 $ mkcommit c_aE0 |
89 $ hg push --new-branch | 105 $ hg push --new-branch |
90 pushing to $TESTTMP/bare-branch-server | 106 pushing to $TESTTMP/bare-branch-server |
107 1 changesets about to be published | |
91 searching for changes | 108 searching for changes |
92 adding changesets | 109 adding changesets |
93 adding manifests | 110 adding manifests |
94 adding file changes | 111 adding file changes |
95 added 1 changesets with 1 changes to 1 files (+1 heads) | 112 added 1 changesets with 1 changes to 1 files (+1 heads) |
96 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | 113 $ hg tgl 'all()' |
97 @ 5:0db08e758601 c_aE0 public branchA | 114 @ 5:0db08e758601 c_aE0 public branchA |
98 | | 115 | |
99 | o 4:9bf953aa81f6 c_dD0 public default | 116 | o 4:9bf953aa81f6 c_dD0 public default |
100 | | | 117 | | |
101 | | o 3:9d5b8e1f08a4 c_dC0 public default | 118 | | o 3:9d5b8e1f08a4 c_dC0 public default |
122 searching for changes | 139 searching for changes |
123 adding changesets | 140 adding changesets |
124 adding manifests | 141 adding manifests |
125 adding file changes | 142 adding file changes |
126 added 1 changesets with 1 changes to 1 files | 143 added 1 changesets with 1 changes to 1 files |
127 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | 144 $ hg tgl 'all()' |
128 @ 6:0867c4471796 c_dF0 draft default foo | 145 @ 6:0867c4471796 c_dF0 draft default foo |
129 | | 146 | |
130 o 4:9bf953aa81f6 c_dD0 public default | 147 o 4:9bf953aa81f6 c_dD0 public default |
131 | | 148 | |
132 | o 3:9d5b8e1f08a4 c_dC0 public default | 149 | o 3:9d5b8e1f08a4 c_dC0 public default |
151 $ mkcommit c_dH0 | 168 $ mkcommit c_dH0 |
152 active topic 'bar' grew its first changeset | 169 active topic 'bar' grew its first changeset |
153 (see 'hg help topics' for more information) | 170 (see 'hg help topics' for more information) |
154 $ hg push | 171 $ hg push |
155 pushing to $TESTTMP/bare-branch-server | 172 pushing to $TESTTMP/bare-branch-server |
173 1 changesets about to be published | |
156 searching for changes | 174 searching for changes |
157 adding changesets | 175 adding changesets |
158 adding manifests | 176 adding manifests |
159 adding file changes | 177 adding file changes |
160 added 2 changesets with 2 changes to 2 files | 178 added 2 changesets with 2 changes to 2 files |
161 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | 179 $ hg tgl 'all()' |
162 @ 8:858be9a8daaf c_dH0 draft default bar | 180 @ 8:858be9a8daaf c_dH0 draft default bar |
163 | | 181 | |
164 o 7:0e4041d324d0 c_dG0 public default | 182 o 7:0e4041d324d0 c_dG0 public default |
165 | | 183 | |
166 o 3:9d5b8e1f08a4 c_dC0 public default | 184 o 3:9d5b8e1f08a4 c_dC0 public default |
191 $ hg update 'desc("c_aE0")' | 209 $ hg update 'desc("c_aE0")' |
192 1 files updated, 0 files merged, 5 files removed, 0 files unresolved | 210 1 files updated, 0 files merged, 5 files removed, 0 files unresolved |
193 $ mkcommit c_aK0 | 211 $ mkcommit c_aK0 |
194 $ hg push | 212 $ hg push |
195 pushing to $TESTTMP/bare-branch-server | 213 pushing to $TESTTMP/bare-branch-server |
214 2 changesets about to be published | |
196 searching for changes | 215 searching for changes |
197 adding changesets | 216 adding changesets |
198 adding manifests | 217 adding manifests |
199 adding file changes | 218 adding file changes |
200 added 3 changesets with 3 changes to 3 files | 219 added 3 changesets with 3 changes to 3 files |
201 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | 220 $ hg tgl 'all()' |
202 @ 11:b0a00ebdfd24 c_aK0 public branchA | 221 @ 11:b0a00ebdfd24 c_aK0 public branchA |
203 | | 222 | |
204 o 5:0db08e758601 c_aE0 public branchA | 223 o 5:0db08e758601 c_aE0 public branchA |
205 | | 224 | |
206 | o 10:abb5c84eb9e9 c_dJ0 draft default bar | 225 | o 10:abb5c84eb9e9 c_dJ0 draft default bar |
233 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 252 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
234 (branch merge, don't forget to commit) | 253 (branch merge, don't forget to commit) |
235 $ hg ci -m 'c_dL0' | 254 $ hg ci -m 'c_dL0' |
236 $ hg push | 255 $ hg push |
237 pushing to $TESTTMP/bare-branch-server | 256 pushing to $TESTTMP/bare-branch-server |
257 2 changesets about to be published | |
238 searching for changes | 258 searching for changes |
239 adding changesets | 259 adding changesets |
240 adding manifests | 260 adding manifests |
241 adding file changes | 261 adding file changes |
242 added 1 changesets with 0 changes to 0 files (-1 heads) | 262 added 1 changesets with 0 changes to 0 files (-1 heads) |
243 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | 263 $ hg tgl 'all()' |
244 @ 12:a6f9f8c6c6cc c_dL0 public default | 264 @ 12:a6f9f8c6c6cc c_dL0 public default |
245 |\ | 265 |\ |
246 | o 9:4b5570d89f0f c_dI0 public default | 266 | o 9:4b5570d89f0f c_dI0 public default |
247 | | | 267 | | |
248 o | 6:0867c4471796 c_dF0 public default | 268 o | 6:0867c4471796 c_dF0 public default |
265 | | | 285 | | |
266 | o 5:0db08e758601 c_aE0 public branchA | 286 | o 5:0db08e758601 c_aE0 public branchA |
267 |/ | 287 |/ |
268 o 0:ea207398892e ROOT public default | 288 o 0:ea207398892e ROOT public default |
269 | 289 |
270 $ hg log -R ../bare-branch-server --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' | 290 $ hg tgl 'all()' -R ../bare-branch-server |
271 o 12:a6f9f8c6c6cc c_dL0 public default | 291 o 12:a6f9f8c6c6cc c_dL0 public default |
272 |\ | 292 |\ |
273 | o 9:4b5570d89f0f c_dI0 public default | 293 | o 9:4b5570d89f0f c_dI0 public default |
274 | | | 294 | | |
275 o | 6:0867c4471796 c_dF0 public default | 295 o | 6:0867c4471796 c_dF0 public default |
326 =================================================== | 346 =================================================== |
327 | 347 |
328 $ hg up branchA | 348 $ hg up branchA |
329 2 files updated, 0 files merged, 5 files removed, 0 files unresolved | 349 2 files updated, 0 files merged, 5 files removed, 0 files unresolved |
330 | 350 |
331 Trying to push changeset without topic (would publish them) | 351 Making sure the topic-publishing mode is announced as a capability |
332 | 352 |
333 $ mkcommit c_aM0 | |
334 $ hg debugcapabilities $TESTTMP/bare-branch-server | grep topics | 353 $ hg debugcapabilities $TESTTMP/bare-branch-server | grep topics |
335 ext-topics-publish=auto | 354 ext-topics-publish=auto |
336 topics | 355 topics |
337 $ hg push --config extensions.evolve= --config experimental.auto-publish=abort -r . | 356 $ hg debugcapabilities ssh://user@dummy/bare-branch-server | grep topics |
357 _exttopics_heads | |
358 ext-topics-publish=auto | |
359 topics | |
360 $ hg serve -R ../bare-branch-server -p $HGPORT -d --pid-file hg.pid | |
361 $ cat hg.pid >> $DAEMON_PIDS | |
362 $ hg debugcapabilities http://localhost:$HGPORT | grep topics | |
363 _exttopics_heads | |
364 ext-topics-publish=auto | |
365 topics | |
366 $ killdaemons.py | |
367 | |
368 Trying to push changeset without topic (would publish them) | |
369 | |
370 $ mkcommit c_aM0 | |
371 $ hg phase --secret --force | |
372 $ hg push --config experimental.auto-publish=abort -r . | |
373 pushing to $TESTTMP/bare-branch-server | |
374 searching for changes | |
375 no changes found (ignored 1 secret changesets) | |
376 [1] | |
377 $ hg phase --draft | |
378 $ hg push --config experimental.auto-publish=abort -r . | |
338 pushing to $TESTTMP/bare-branch-server | 379 pushing to $TESTTMP/bare-branch-server |
339 abort: push would publish 1 changesets | 380 abort: push would publish 1 changesets |
340 (use --publish or adjust 'experimental.auto-publish' config) | 381 (use --publish or adjust 'experimental.auto-publish' config) |
341 [255] | 382 [255] |
342 $ hg push --config extensions.evolve= --config experimental.auto-publish=abort -r . --publish | 383 $ hg push --config experimental.auto-publish=abort -r . --publish |
343 pushing to $TESTTMP/bare-branch-server | 384 pushing to $TESTTMP/bare-branch-server |
344 searching for changes | 385 searching for changes |
345 adding changesets | 386 adding changesets |
346 adding manifests | 387 adding manifests |
347 adding file changes | 388 adding file changes |
349 | 390 |
350 Pushing a changeset with topic (not publishing, no warning) | 391 Pushing a changeset with topic (not publishing, no warning) |
351 | 392 |
352 $ hg topic test-push-protection | 393 $ hg topic test-push-protection |
353 marked working directory as topic: test-push-protection | 394 marked working directory as topic: test-push-protection |
354 $ mkcommit c_aL0 | 395 $ mkcommit c_aN0 |
355 active topic 'test-push-protection' grew its first changeset | 396 active topic 'test-push-protection' grew its first changeset |
356 (see 'hg help topics' for more information) | 397 (see 'hg help topics' for more information) |
357 $ hg push --config extensions.evolve= --config experimental.auto-publish=abort -r . | 398 $ hg push --config experimental.auto-publish=abort -r . |
358 pushing to $TESTTMP/bare-branch-server | 399 pushing to $TESTTMP/bare-branch-server |
359 searching for changes | 400 searching for changes |
360 adding changesets | 401 adding changesets |
361 adding manifests | 402 adding manifests |
362 adding file changes | 403 adding file changes |