1 ===================== |
|
2 Test workflow options |
|
3 ===================== |
|
4 |
|
5 $ . "$TESTDIR/testlib/topic_setup.sh" |
|
6 $ . "$TESTDIR/testlib/common.sh" |
|
7 |
|
8 testing hg push --publish flag |
|
9 ============================== |
|
10 |
|
11 $ hg init bare-branch-server |
|
12 $ cd bare-branch-server |
|
13 $ cat <<EOF >> .hg/hgrc |
|
14 > [phases] |
|
15 > publish = no |
|
16 > EOF |
|
17 $ mkcommit ROOT |
|
18 $ mkcommit c_dA0 |
|
19 $ hg phase --public -r 'all()' |
|
20 $ cd .. |
|
21 |
|
22 $ hg clone bare-branch-server bare-client |
|
23 updating to branch default |
|
24 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
25 $ cd bare-client |
|
26 |
|
27 Pushing a 1 new changeset |
|
28 ------------------------- |
|
29 |
|
30 $ mkcommit c_dB0 |
|
31 $ hg push --publish |
|
32 pushing to $TESTTMP/bare-branch-server |
|
33 searching for changes |
|
34 adding changesets |
|
35 adding manifests |
|
36 adding file changes |
|
37 added 1 changesets with 1 changes to 1 files |
|
38 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
39 @ 2:286d02a6e2a2 c_dB0 public default |
|
40 | |
|
41 o 1:134bc3852ad2 c_dA0 public default |
|
42 | |
|
43 o 0:ea207398892e ROOT public default |
|
44 |
|
45 |
|
46 Pushing a 2 new changeset (same branch) |
|
47 --------------------------------------- |
|
48 |
|
49 $ mkcommit c_dC0 |
|
50 $ mkcommit c_dD0 |
|
51 $ hg push --publish |
|
52 pushing to $TESTTMP/bare-branch-server |
|
53 searching for changes |
|
54 adding changesets |
|
55 adding manifests |
|
56 adding file changes |
|
57 added 2 changesets with 2 changes to 2 files |
|
58 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
59 @ 4:c63e7dd93a91 c_dD0 public default |
|
60 | |
|
61 o 3:7d56a56d2547 c_dC0 public default |
|
62 | |
|
63 o 2:286d02a6e2a2 c_dB0 public default |
|
64 | |
|
65 o 1:134bc3852ad2 c_dA0 public default |
|
66 | |
|
67 o 0:ea207398892e ROOT public default |
|
68 |
|
69 |
|
70 Pushing a 2 new changeset two head |
|
71 ---------------------------------- |
|
72 |
|
73 $ mkcommit c_dE0 |
|
74 $ hg update 'desc("c_dD0")' |
|
75 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
76 $ hg branch other |
|
77 marked working directory as branch other |
|
78 (branches are permanent and global, did you want a bookmark?) |
|
79 $ mkcommit c_oF0 |
|
80 $ hg push -f --publish |
|
81 pushing to $TESTTMP/bare-branch-server |
|
82 searching for changes |
|
83 adding changesets |
|
84 adding manifests |
|
85 adding file changes |
|
86 added 2 changesets with 2 changes to 2 files (+1 heads) |
|
87 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
88 @ 6:45b23c834b6a c_oF0 public other |
|
89 | |
|
90 | o 5:5576ae39eaee c_dE0 public default |
|
91 |/ |
|
92 o 4:c63e7dd93a91 c_dD0 public default |
|
93 | |
|
94 o 3:7d56a56d2547 c_dC0 public default |
|
95 | |
|
96 o 2:286d02a6e2a2 c_dB0 public default |
|
97 | |
|
98 o 1:134bc3852ad2 c_dA0 public default |
|
99 | |
|
100 o 0:ea207398892e ROOT public default |
|
101 |
|
102 |
|
103 Publishing 1 common changeset |
|
104 ----------------------------- |
|
105 $ mkcommit c_oG0 |
|
106 $ hg push |
|
107 pushing to $TESTTMP/bare-branch-server |
|
108 searching for changes |
|
109 adding changesets |
|
110 adding manifests |
|
111 adding file changes |
|
112 added 1 changesets with 1 changes to 1 files |
|
113 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
114 @ 7:d293f74a1233 c_oG0 draft other |
|
115 | |
|
116 o 6:45b23c834b6a c_oF0 public other |
|
117 | |
|
118 | o 5:5576ae39eaee c_dE0 public default |
|
119 |/ |
|
120 o 4:c63e7dd93a91 c_dD0 public default |
|
121 | |
|
122 o 3:7d56a56d2547 c_dC0 public default |
|
123 | |
|
124 o 2:286d02a6e2a2 c_dB0 public default |
|
125 | |
|
126 o 1:134bc3852ad2 c_dA0 public default |
|
127 | |
|
128 o 0:ea207398892e ROOT public default |
|
129 |
|
130 $ hg push --publish |
|
131 pushing to $TESTTMP/bare-branch-server |
|
132 searching for changes |
|
133 no changes found |
|
134 [1] |
|
135 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
136 @ 7:d293f74a1233 c_oG0 public other |
|
137 | |
|
138 o 6:45b23c834b6a c_oF0 public other |
|
139 | |
|
140 | o 5:5576ae39eaee c_dE0 public default |
|
141 |/ |
|
142 o 4:c63e7dd93a91 c_dD0 public default |
|
143 | |
|
144 o 3:7d56a56d2547 c_dC0 public default |
|
145 | |
|
146 o 2:286d02a6e2a2 c_dB0 public default |
|
147 | |
|
148 o 1:134bc3852ad2 c_dA0 public default |
|
149 | |
|
150 o 0:ea207398892e ROOT public default |
|
151 |
|
152 |
|
153 Selectively publishing 1 changeset |
|
154 ---------------------------------- |
|
155 |
|
156 $ mkcommit c_oH0 |
|
157 $ hg update default |
|
158 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
159 $ mkcommit c_dI0 |
|
160 $ hg push -r default --publish |
|
161 pushing to $TESTTMP/bare-branch-server |
|
162 searching for changes |
|
163 adding changesets |
|
164 adding manifests |
|
165 adding file changes |
|
166 added 1 changesets with 1 changes to 1 files |
|
167 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
168 @ 9:fbf2be276221 c_dI0 public default |
|
169 | |
|
170 o 5:5576ae39eaee c_dE0 public default |
|
171 | |
|
172 | o 8:8e85646c135f c_oH0 draft other |
|
173 | | |
|
174 | o 7:d293f74a1233 c_oG0 public other |
|
175 | | |
|
176 | o 6:45b23c834b6a c_oF0 public other |
|
177 |/ |
|
178 o 4:c63e7dd93a91 c_dD0 public default |
|
179 | |
|
180 o 3:7d56a56d2547 c_dC0 public default |
|
181 | |
|
182 o 2:286d02a6e2a2 c_dB0 public default |
|
183 | |
|
184 o 1:134bc3852ad2 c_dA0 public default |
|
185 | |
|
186 o 0:ea207398892e ROOT public default |
|
187 |
|
188 |
|
189 Selectively publishing 1 common changeset |
|
190 ----------------------------------------- |
|
191 |
|
192 $ mkcommit c_dJ0 |
|
193 $ hg push |
|
194 pushing to $TESTTMP/bare-branch-server |
|
195 searching for changes |
|
196 adding changesets |
|
197 adding manifests |
|
198 adding file changes |
|
199 added 2 changesets with 2 changes to 2 files |
|
200 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
201 @ 10:ac4cf59f2aac c_dJ0 draft default |
|
202 | |
|
203 o 9:fbf2be276221 c_dI0 public default |
|
204 | |
|
205 o 5:5576ae39eaee c_dE0 public default |
|
206 | |
|
207 | o 8:8e85646c135f c_oH0 draft other |
|
208 | | |
|
209 | o 7:d293f74a1233 c_oG0 public other |
|
210 | | |
|
211 | o 6:45b23c834b6a c_oF0 public other |
|
212 |/ |
|
213 o 4:c63e7dd93a91 c_dD0 public default |
|
214 | |
|
215 o 3:7d56a56d2547 c_dC0 public default |
|
216 | |
|
217 o 2:286d02a6e2a2 c_dB0 public default |
|
218 | |
|
219 o 1:134bc3852ad2 c_dA0 public default |
|
220 | |
|
221 o 0:ea207398892e ROOT public default |
|
222 |
|
223 $ hg push --rev default --publish |
|
224 pushing to $TESTTMP/bare-branch-server |
|
225 searching for changes |
|
226 no changes found |
|
227 [1] |
|
228 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
229 @ 10:ac4cf59f2aac c_dJ0 public default |
|
230 | |
|
231 o 9:fbf2be276221 c_dI0 public default |
|
232 | |
|
233 o 5:5576ae39eaee c_dE0 public default |
|
234 | |
|
235 | o 8:8e85646c135f c_oH0 draft other |
|
236 | | |
|
237 | o 7:d293f74a1233 c_oG0 public other |
|
238 | | |
|
239 | o 6:45b23c834b6a c_oF0 public other |
|
240 |/ |
|
241 o 4:c63e7dd93a91 c_dD0 public default |
|
242 | |
|
243 o 3:7d56a56d2547 c_dC0 public default |
|
244 | |
|
245 o 2:286d02a6e2a2 c_dB0 public default |
|
246 | |
|
247 o 1:134bc3852ad2 c_dA0 public default |
|
248 | |
|
249 o 0:ea207398892e ROOT public default |
|
250 |
|
251 |
|
252 Selectively publishing no changeset |
|
253 ----------------------------------- |
|
254 |
|
255 $ hg push --rev default --publish |
|
256 pushing to $TESTTMP/bare-branch-server |
|
257 searching for changes |
|
258 no changes found |
|
259 [1] |
|
260 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
261 @ 10:ac4cf59f2aac c_dJ0 public default |
|
262 | |
|
263 o 9:fbf2be276221 c_dI0 public default |
|
264 | |
|
265 o 5:5576ae39eaee c_dE0 public default |
|
266 | |
|
267 | o 8:8e85646c135f c_oH0 draft other |
|
268 | | |
|
269 | o 7:d293f74a1233 c_oG0 public other |
|
270 | | |
|
271 | o 6:45b23c834b6a c_oF0 public other |
|
272 |/ |
|
273 o 4:c63e7dd93a91 c_dD0 public default |
|
274 | |
|
275 o 3:7d56a56d2547 c_dC0 public default |
|
276 | |
|
277 o 2:286d02a6e2a2 c_dB0 public default |
|
278 | |
|
279 o 1:134bc3852ad2 c_dA0 public default |
|
280 | |
|
281 o 0:ea207398892e ROOT public default |
|
282 |
|
283 |
|
284 Testing --publish interaction with multiple head detection |
|
285 ============================================================ |
|
286 |
|
287 pushing a topic changeset, publishing it |
|
288 ---------------------------------------- |
|
289 |
|
290 $ hg topic topic_A |
|
291 marked working directory as topic: topic_A |
|
292 $ mkcommit c_dK0 |
|
293 active topic 'topic_A' grew its first changeset |
|
294 (see 'hg help topics' for more information) |
|
295 $ hg push -r 'desc("c_dK0")' --publish |
|
296 pushing to $TESTTMP/bare-branch-server |
|
297 searching for changes |
|
298 adding changesets |
|
299 adding manifests |
|
300 adding file changes |
|
301 added 1 changesets with 1 changes to 1 files |
|
302 active topic 'topic_A' is now empty |
|
303 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
304 @ 11:d06fc4f891e8 c_dK0 public default |
|
305 | |
|
306 o 10:ac4cf59f2aac c_dJ0 public default |
|
307 | |
|
308 o 9:fbf2be276221 c_dI0 public default |
|
309 | |
|
310 o 5:5576ae39eaee c_dE0 public default |
|
311 | |
|
312 | o 8:8e85646c135f c_oH0 draft other |
|
313 | | |
|
314 | o 7:d293f74a1233 c_oG0 public other |
|
315 | | |
|
316 | o 6:45b23c834b6a c_oF0 public other |
|
317 |/ |
|
318 o 4:c63e7dd93a91 c_dD0 public default |
|
319 | |
|
320 o 3:7d56a56d2547 c_dC0 public default |
|
321 | |
|
322 o 2:286d02a6e2a2 c_dB0 public default |
|
323 | |
|
324 o 1:134bc3852ad2 c_dA0 public default |
|
325 | |
|
326 o 0:ea207398892e ROOT public default |
|
327 |
|
328 |
|
329 pushing a new branch, alongside an existing topic |
|
330 ------------------------------------------------- |
|
331 |
|
332 $ hg topic topic_A |
|
333 $ mkcommit c_dL0 |
|
334 active topic 'topic_A' grew its first changeset |
|
335 (see 'hg help topics' for more information) |
|
336 $ hg push -r 'desc("c_dL0")' |
|
337 pushing to $TESTTMP/bare-branch-server |
|
338 searching for changes |
|
339 adding changesets |
|
340 adding manifests |
|
341 adding file changes |
|
342 added 1 changesets with 1 changes to 1 files |
|
343 $ hg update 'desc("c_dK")' |
|
344 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
345 $ mkcommit c_dM0 |
|
346 $ hg push -r 'desc("c_dM0")' --publish |
|
347 pushing to $TESTTMP/bare-branch-server |
|
348 searching for changes |
|
349 adding changesets |
|
350 adding manifests |
|
351 adding file changes |
|
352 added 1 changesets with 1 changes to 1 files (+1 heads) |
|
353 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
354 @ 13:0d144c8b6c8f c_dM0 public default |
|
355 | |
|
356 | o 12:3c73f6cabf07 c_dL0 draft default topic_A |
|
357 |/ |
|
358 o 11:d06fc4f891e8 c_dK0 public default |
|
359 | |
|
360 o 10:ac4cf59f2aac c_dJ0 public default |
|
361 | |
|
362 o 9:fbf2be276221 c_dI0 public default |
|
363 | |
|
364 o 5:5576ae39eaee c_dE0 public default |
|
365 | |
|
366 | o 8:8e85646c135f c_oH0 draft other |
|
367 | | |
|
368 | o 7:d293f74a1233 c_oG0 public other |
|
369 | | |
|
370 | o 6:45b23c834b6a c_oF0 public other |
|
371 |/ |
|
372 o 4:c63e7dd93a91 c_dD0 public default |
|
373 | |
|
374 o 3:7d56a56d2547 c_dC0 public default |
|
375 | |
|
376 o 2:286d02a6e2a2 c_dB0 public default |
|
377 | |
|
378 o 1:134bc3852ad2 c_dA0 public default |
|
379 | |
|
380 o 0:ea207398892e ROOT public default |
|
381 |
|
382 |
|
383 pushing a topic (publishing) alongside and existing branch head |
|
384 --------------------------------------------------------------- |
|
385 |
|
386 $ hg update 'desc("c_dK")' |
|
387 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
388 $ hg topic topic_B |
|
389 marked working directory as topic: topic_B |
|
390 $ mkcommit c_dN0 |
|
391 active topic 'topic_B' grew its first changeset |
|
392 (see 'hg help topics' for more information) |
|
393 $ hg push -r 'desc("c_dN0")' --publish |
|
394 pushing to $TESTTMP/bare-branch-server |
|
395 searching for changes |
|
396 abort: push creates new remote head 4dcd0be9db96! |
|
397 (merge or see 'hg help push' for details about pushing new heads) |
|
398 [255] |
|
399 $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}' |
|
400 @ 14:4dcd0be9db96 c_dN0 draft default topic_B |
|
401 | |
|
402 | o 13:0d144c8b6c8f c_dM0 public default |
|
403 |/ |
|
404 | o 12:3c73f6cabf07 c_dL0 draft default topic_A |
|
405 |/ |
|
406 o 11:d06fc4f891e8 c_dK0 public default |
|
407 | |
|
408 o 10:ac4cf59f2aac c_dJ0 public default |
|
409 | |
|
410 o 9:fbf2be276221 c_dI0 public default |
|
411 | |
|
412 o 5:5576ae39eaee c_dE0 public default |
|
413 | |
|
414 | o 8:8e85646c135f c_oH0 draft other |
|
415 | | |
|
416 | o 7:d293f74a1233 c_oG0 public other |
|
417 | | |
|
418 | o 6:45b23c834b6a c_oF0 public other |
|
419 |/ |
|
420 o 4:c63e7dd93a91 c_dD0 public default |
|
421 | |
|
422 o 3:7d56a56d2547 c_dC0 public default |
|
423 | |
|
424 o 2:286d02a6e2a2 c_dB0 public default |
|
425 | |
|
426 o 1:134bc3852ad2 c_dA0 public default |
|
427 | |
|
428 o 0:ea207398892e ROOT public default |
|
429 |
|