Mercurial > evolve
comparison tests/test-split.t @ 4174:e07e764c0f48 mercurial-4.3
test-compat: merge mercurial-4.4 into mercurial-4.3
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 12 Oct 2018 15:20:54 +0200 |
parents | 537fd9a86c06 e268f7fd7839 |
children |
comparison
equal
deleted
inserted
replaced
4173:e268f7fd7839 | 4174:e07e764c0f48 |
---|---|
37 $ mkcommit _c --user other-test-user | 37 $ mkcommit _c --user other-test-user |
38 $ mkcommit _d | 38 $ mkcommit _d |
39 $ echo "change to a" >> _a | 39 $ echo "change to a" >> _a |
40 $ hg amend | 40 $ hg amend |
41 $ hg debugobsolete | 41 $ hg debugobsolete |
42 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | 42 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) |
43 06be89dfe2ae447383f30a2984933352757b6fb4 0 {1334a80b33c3f9873edab728fbbcf500eab61d2e} (*) {'ef1': '0', 'user': 'test'} (glob) | |
43 | 44 |
44 To create commits with the number of split | 45 To create commits with the number of split |
45 $ echo 0 > num | 46 $ echo 0 > num |
46 $ cat > editor.sh << '__EOF__' | 47 $ cat > editor.sh << '__EOF__' |
47 > NUM=$(cat num) | 48 > NUM=$(cat num) |
89 record this change to '_d'? [Ynesfdaq?] y | 90 record this change to '_d'? [Ynesfdaq?] y |
90 | 91 |
91 no more change to split | 92 no more change to split |
92 | 93 |
93 $ hg debugobsolete | 94 $ hg debugobsolete |
94 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | 95 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'user': 'test'} |
95 d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'split', 'user': 'test'} | 96 06be89dfe2ae447383f30a2984933352757b6fb4 0 {1334a80b33c3f9873edab728fbbcf500eab61d2e} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'user': 'test'} |
97 d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'user': 'test'} | |
96 $ hg log -G | 98 $ hg log -G |
97 @ changeset: 6:033b3f5ae73d | 99 @ changeset: 7:033b3f5ae73d |
98 | tag: tip | 100 | tag: tip |
99 | user: test | 101 | user: test |
100 | date: Thu Jan 01 00:00:00 1970 +0000 | 102 | date: Thu Jan 01 00:00:00 1970 +0000 |
101 | summary: split2 | 103 | summary: split2 |
102 | | 104 | |
103 o changeset: 5:2d8abdb827cd | 105 o changeset: 6:2d8abdb827cd |
104 | parent: 2:52149352b372 | 106 | parent: 2:52149352b372 |
105 | user: test | 107 | user: test |
106 | date: Thu Jan 01 00:00:00 1970 +0000 | 108 | date: Thu Jan 01 00:00:00 1970 +0000 |
107 | summary: split1 | 109 | summary: split1 |
108 | | 110 | |
144 $ hg phase --rev 'desc("_a")' --draft --force | 146 $ hg phase --rev 'desc("_a")' --draft --force |
145 | 147 |
146 Split a revision specified with -r | 148 Split a revision specified with -r |
147 $ echo "change to b" >> _b | 149 $ echo "change to b" >> _b |
148 $ hg amend -m "_cprim" | 150 $ hg amend -m "_cprim" |
149 2 new orphan changesets | 151 2 new unstable changesets |
150 $ hg evolve --all | 152 $ hg evolve --all |
151 move:[5] split1 | 153 move:[6] split1 |
152 atop:[7] _cprim | 154 atop:[9] _cprim |
153 move:[6] split2 | 155 move:[7] split2 |
154 working directory is now at * (glob) | 156 working directory is now at * (glob) |
155 $ hg log -r "desc(_cprim)" -v -p | 157 $ hg log -r "desc(_cprim)" -v -p |
156 changeset: 7:b434287e665c | 158 changeset: 9:b434287e665c |
157 parent: 1:37445b16603b | 159 parent: 1:37445b16603b |
158 user: other-test-user | 160 user: other-test-user |
159 date: Thu Jan 01 00:00:00 1970 +0000 | 161 date: Thu Jan 01 00:00:00 1970 +0000 |
160 files: _b _c | 162 files: _b _c |
161 description: | 163 description: |
205 | 207 |
206 Stop before splitting the commit completely creates a commit with all the | 208 Stop before splitting the commit completely creates a commit with all the |
207 remaining changes | 209 remaining changes |
208 | 210 |
209 $ hg debugobsolete | 211 $ hg debugobsolete |
210 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} | 212 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) |
211 d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'split', 'user': 'test'} | 213 06be89dfe2ae447383f30a2984933352757b6fb4 0 {1334a80b33c3f9873edab728fbbcf500eab61d2e} (*) {'ef1': '0', 'user': 'test'} (glob) |
212 52149352b372d39b19127d5bd2d488b1b63f9f85 b434287e665ce757ee5463a965cb3d119ca9e893 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} | 214 d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'user': 'test'} |
213 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b e2b4afde39803bd42bb1374b230fca1b1e8cc868 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} | 215 52149352b372d39b19127d5bd2d488b1b63f9f85 b434287e665ce757ee5463a965cb3d119ca9e893 0 (*) {'ef1': '9', 'user': 'test'} (glob) |
214 033b3f5ae73db67c10de938fb6f26b949aaef172 bb5e4f6020c74e7961a51fda635ea9df9b04dda8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'} | 216 7a4fc25a48a5797bb069563854455aecf738d8f2 0 {52149352b372d39b19127d5bd2d488b1b63f9f85} (*) {'ef1': '0', 'user': 'test'} (glob) |
215 b434287e665ce757ee5463a965cb3d119ca9e893 ead2066d1dbf14833fe1069df1b735e4e9468c40 1188c4216eba37f18a1de6558564601d00ff2143 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'split', 'user': 'test'} | 217 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b e2b4afde39803bd42bb1374b230fca1b1e8cc868 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'user': 'test'} |
218 033b3f5ae73db67c10de938fb6f26b949aaef172 bb5e4f6020c74e7961a51fda635ea9df9b04dda8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'user': 'test'} | |
219 b434287e665ce757ee5463a965cb3d119ca9e893 ead2066d1dbf14833fe1069df1b735e4e9468c40 1188c4216eba37f18a1de6558564601d00ff2143 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'user': 'test'} | |
216 $ hg evolve --all | 220 $ hg evolve --all |
217 move:[8] split1 | 221 move:[10] split1 |
218 atop:[11] split4 | 222 atop:[13] split4 |
219 move:[9] split2 | 223 move:[11] split2 |
220 working directory is now at d74c6715e706 | 224 working directory is now at d74c6715e706 |
221 $ hg log -G | 225 $ hg log -G |
222 @ changeset: 13:d74c6715e706 | 226 @ changeset: 15:d74c6715e706 |
223 | tag: tip | 227 | tag: tip |
224 | user: test | 228 | user: test |
225 | date: Thu Jan 01 00:00:00 1970 +0000 | 229 | date: Thu Jan 01 00:00:00 1970 +0000 |
226 | summary: split2 | 230 | summary: split2 |
227 | | 231 | |
228 o changeset: 12:3f134f739075 | 232 o changeset: 14:3f134f739075 |
229 | user: test | 233 | user: test |
230 | date: Thu Jan 01 00:00:00 1970 +0000 | 234 | date: Thu Jan 01 00:00:00 1970 +0000 |
231 | summary: split1 | 235 | summary: split1 |
232 | | 236 | |
233 o changeset: 11:1188c4216eba | 237 o changeset: 13:1188c4216eba |
234 | user: other-test-user | 238 | user: other-test-user |
235 | date: Thu Jan 01 00:00:00 1970 +0000 | 239 | date: Thu Jan 01 00:00:00 1970 +0000 |
236 | summary: split4 | 240 | summary: split4 |
237 | | 241 | |
238 o changeset: 10:ead2066d1dbf | 242 o changeset: 12:ead2066d1dbf |
239 | parent: 1:37445b16603b | 243 | parent: 1:37445b16603b |
240 | user: other-test-user | 244 | user: other-test-user |
241 | date: Thu Jan 01 00:00:00 1970 +0000 | 245 | date: Thu Jan 01 00:00:00 1970 +0000 |
242 | summary: split3 | 246 | summary: split3 |
243 | | 247 | |
257 $ hg book bookA | 261 $ hg book bookA |
258 $ hg book bookB | 262 $ hg book bookB |
259 $ echo "changetofilea" > _a | 263 $ echo "changetofilea" > _a |
260 $ hg amend | 264 $ hg amend |
261 $ hg book | 265 $ hg book |
262 bookA 14:7a6b35779b85 | 266 bookA 17:7a6b35779b85 |
263 * bookB 14:7a6b35779b85 | 267 * bookB 17:7a6b35779b85 |
264 $ hg log -G -r "3f134f739075::" | 268 $ hg log -G -r "14::" |
265 @ changeset: 14:7a6b35779b85 | 269 @ changeset: 17:7a6b35779b85 |
266 | bookmark: bookA | 270 | bookmark: bookA |
267 | bookmark: bookB | 271 | bookmark: bookB |
268 | tag: tip | 272 | tag: tip |
269 | parent: 12:3f134f739075 | 273 | parent: 14:3f134f739075 |
270 | user: test | 274 | user: test |
271 | date: Thu Jan 01 00:00:00 1970 +0000 | 275 | date: Thu Jan 01 00:00:00 1970 +0000 |
272 | summary: split2 | 276 | summary: split2 |
273 | | 277 | |
274 o changeset: 12:3f134f739075 | 278 o changeset: 14:3f134f739075 |
275 | user: test | 279 | user: test |
276 ~ date: Thu Jan 01 00:00:00 1970 +0000 | 280 ~ date: Thu Jan 01 00:00:00 1970 +0000 |
277 summary: split1 | 281 summary: split1 |
278 | 282 |
279 $ hg split --user victor <<EOF | 283 $ hg split --user victor <<EOF |
300 new file mode 100644 | 304 new file mode 100644 |
301 examine changes to '_d'? [Ynesfdaq?] n | 305 examine changes to '_d'? [Ynesfdaq?] n |
302 | 306 |
303 created new head | 307 created new head |
304 Done splitting? [yN] y | 308 Done splitting? [yN] y |
305 $ hg log -G -r "3f134f739075::" | 309 $ hg log -G -r "14::" |
306 @ changeset: 16:452a26648478 | 310 @ changeset: 19:452a26648478 |
307 | bookmark: bookA | 311 | bookmark: bookA |
308 | bookmark: bookB | 312 | bookmark: bookB |
309 | tag: tip | 313 | tag: tip |
310 | user: victor | 314 | user: victor |
311 | date: Thu Jan 01 00:00:00 1970 +0000 | 315 | date: Thu Jan 01 00:00:00 1970 +0000 |
312 | summary: split6 | 316 | summary: split6 |
313 | | 317 | |
314 o changeset: 15:1315679b77dc | 318 o changeset: 18:1315679b77dc |
315 | parent: 12:3f134f739075 | 319 | parent: 14:3f134f739075 |
316 | user: victor | 320 | user: victor |
317 | date: Thu Jan 01 00:00:00 1970 +0000 | 321 | date: Thu Jan 01 00:00:00 1970 +0000 |
318 | summary: split5 | 322 | summary: split5 |
319 | | 323 | |
320 o changeset: 12:3f134f739075 | 324 o changeset: 14:3f134f739075 |
321 | user: test | 325 | user: test |
322 ~ date: Thu Jan 01 00:00:00 1970 +0000 | 326 ~ date: Thu Jan 01 00:00:00 1970 +0000 |
323 summary: split1 | 327 summary: split1 |
324 | 328 |
325 $ hg book | 329 $ hg book |
326 bookA 16:452a26648478 | 330 bookA 19:452a26648478 |
327 * bookB 16:452a26648478 | 331 * bookB 19:452a26648478 |
328 | 332 |
329 Lastest revision is selected if multiple are given to -r | 333 Lastest revision is selected if multiple are given to -r |
330 $ hg split -r "desc(_a)::" | 334 $ hg split -r "desc(_a)::" |
331 (leaving bookmark bookB) | 335 (leaving bookmark bookB) |
332 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 336 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
409 $ hg add babar celeste | 413 $ hg add babar celeste |
410 $ hg commit -m "Works on mytopic" babar celeste --user victor | 414 $ hg commit -m "Works on mytopic" babar celeste --user victor |
411 active topic 'mytopic' grew its first changeset | 415 active topic 'mytopic' grew its first changeset |
412 (see 'hg help topics' for more information) | 416 (see 'hg help topics' for more information) |
413 $ hg log -r . | 417 $ hg log -r . |
414 changeset: 18:26f72cfaf036 | 418 changeset: 21:26f72cfaf036 |
415 branch: new-branch | 419 branch: new-branch |
416 tag: tip | 420 tag: tip |
417 topic: mytopic | 421 topic: mytopic |
418 user: victor | 422 user: victor |
419 date: Thu Jan 01 00:00:00 1970 +0000 | 423 date: Thu Jan 01 00:00:00 1970 +0000 |
420 summary: Works on mytopic | 424 summary: Works on mytopic |
421 | 425 |
422 $ hg summary | 426 $ hg summary |
423 parent: 18:26f72cfaf036 tip | 427 parent: 21:26f72cfaf036 tip |
424 Works on mytopic | 428 Works on mytopic |
425 branch: new-branch | 429 branch: new-branch |
426 commit: 2 unknown (clean) | 430 commit: 2 unknown (clean) |
427 update: (current) | 431 update: (current) |
428 phases: 9 draft | 432 phases: 9 draft |
465 no more change to split | 469 no more change to split |
466 | 470 |
467 Check that the topic is still here | 471 Check that the topic is still here |
468 | 472 |
469 $ hg log -r "tip~1::" | 473 $ hg log -r "tip~1::" |
470 changeset: 19:addcf498f19e | 474 changeset: 22:addcf498f19e |
471 branch: new-branch | 475 branch: new-branch |
472 topic: mytopic | 476 topic: mytopic |
473 parent: 17:fdb403258632 | 477 parent: 20:fdb403258632 |
474 user: test | 478 user: test |
475 date: Thu Jan 01 00:00:00 1970 +0000 | 479 date: Thu Jan 01 00:00:00 1970 +0000 |
476 summary: split7 | 480 summary: split7 |
477 | 481 |
478 changeset: 20:2532b288af61 | 482 changeset: 23:2532b288af61 |
479 branch: new-branch | 483 branch: new-branch |
480 tag: tip | 484 tag: tip |
481 topic: mytopic | 485 topic: mytopic |
482 user: test | 486 user: test |
483 date: Thu Jan 01 00:00:00 1970 +0000 | 487 date: Thu Jan 01 00:00:00 1970 +0000 |
492 $ hg add SPLIT1 SPLIT2 | 496 $ hg add SPLIT1 SPLIT2 |
493 $ hg branch another-branch | 497 $ hg branch another-branch |
494 marked working directory as branch another-branch | 498 marked working directory as branch another-branch |
495 $ hg commit -m "To be splitted" | 499 $ hg commit -m "To be splitted" |
496 $ hg log -G -l 3 | 500 $ hg log -G -l 3 |
497 @ changeset: 21:8dad923bdb9b | 501 @ changeset: 24:8dad923bdb9b |
498 | branch: another-branch | 502 | branch: another-branch |
499 | tag: tip | 503 | tag: tip |
500 | topic: mytopic | 504 | topic: mytopic |
501 | user: test | 505 | user: test |
502 | date: Thu Jan 01 00:00:00 1970 +0000 | 506 | date: Thu Jan 01 00:00:00 1970 +0000 |
503 | summary: To be splitted | 507 | summary: To be splitted |
504 | | 508 | |
505 o changeset: 20:2532b288af61 | 509 o changeset: 23:2532b288af61 |
506 | branch: new-branch | 510 | branch: new-branch |
507 | topic: mytopic | 511 | topic: mytopic |
508 | user: test | 512 | user: test |
509 | date: Thu Jan 01 00:00:00 1970 +0000 | 513 | date: Thu Jan 01 00:00:00 1970 +0000 |
510 | summary: split8 | 514 | summary: split8 |
511 | | 515 | |
512 o changeset: 19:addcf498f19e | 516 o changeset: 22:addcf498f19e |
513 | branch: new-branch | 517 | branch: new-branch |
514 ~ topic: mytopic | 518 ~ topic: mytopic |
515 parent: 17:fdb403258632 | 519 parent: 20:fdb403258632 |
516 user: test | 520 user: test |
517 date: Thu Jan 01 00:00:00 1970 +0000 | 521 date: Thu Jan 01 00:00:00 1970 +0000 |
518 summary: split7 | 522 summary: split7 |
519 | 523 |
520 $ hg export . | 524 $ hg export . |
557 | 561 |
558 no more change to split | 562 no more change to split |
559 | 563 |
560 The splitted changesets should be on the 'another-branch' | 564 The splitted changesets should be on the 'another-branch' |
561 $ hg log -G -l 3 | 565 $ hg log -G -l 3 |
562 @ changeset: 23:56a59faa8af7 | 566 @ changeset: 26:56a59faa8af7 |
563 | branch: another-branch | 567 | branch: another-branch |
564 | tag: tip | 568 | tag: tip |
565 | topic: mytopic | 569 | topic: mytopic |
566 | user: test | 570 | user: test |
567 | date: Thu Jan 01 00:00:00 1970 +0000 | 571 | date: Thu Jan 01 00:00:00 1970 +0000 |
568 | summary: split10 | 572 | summary: split10 |
569 | | 573 | |
570 o changeset: 22:75695e3e2300 | 574 o changeset: 25:75695e3e2300 |
571 | branch: another-branch | 575 | branch: another-branch |
572 | topic: mytopic | 576 | topic: mytopic |
573 | parent: 20:2532b288af61 | 577 | parent: 23:2532b288af61 |
574 | user: test | 578 | user: test |
575 | date: Thu Jan 01 00:00:00 1970 +0000 | 579 | date: Thu Jan 01 00:00:00 1970 +0000 |
576 | summary: split9 | 580 | summary: split9 |
577 | | 581 | |
578 o changeset: 20:2532b288af61 | 582 o changeset: 23:2532b288af61 |
579 | branch: new-branch | 583 | branch: new-branch |
580 ~ topic: mytopic | 584 ~ topic: mytopic |
581 user: test | 585 user: test |
582 date: Thu Jan 01 00:00:00 1970 +0000 | 586 date: Thu Jan 01 00:00:00 1970 +0000 |
583 summary: split8 | 587 summary: split8 |
593 | 597 |
594 $ hg up "tip~1" | 598 $ hg up "tip~1" |
595 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | 599 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
596 | 600 |
597 $ hg log -G -l 2 | 601 $ hg log -G -l 2 |
598 o changeset: 24:b1020d17c364 | 602 o changeset: 27:b1020d17c364 |
599 | branch: yet-another-branch | 603 | branch: yet-another-branch |
600 | tag: tip | 604 | tag: tip |
601 | topic: mytopic | 605 | topic: mytopic |
602 | user: test | 606 | user: test |
603 | date: Thu Jan 01 00:00:00 1970 +0000 | 607 | date: Thu Jan 01 00:00:00 1970 +0000 |
604 | summary: To be splitted again | 608 | summary: To be splitted again |
605 | | 609 | |
606 @ changeset: 23:56a59faa8af7 | 610 @ changeset: 26:56a59faa8af7 |
607 | branch: another-branch | 611 | branch: another-branch |
608 ~ topic: mytopic | 612 ~ topic: mytopic |
609 user: test | 613 user: test |
610 date: Thu Jan 01 00:00:00 1970 +0000 | 614 date: Thu Jan 01 00:00:00 1970 +0000 |
611 summary: split10 | 615 summary: split10 |
633 | 637 |
634 $ hg branch | 638 $ hg branch |
635 another-branch | 639 another-branch |
636 | 640 |
637 $ hg log -G -l 2 | 641 $ hg log -G -l 2 |
638 o changeset: 24:b1020d17c364 | 642 o changeset: 27:b1020d17c364 |
639 | branch: yet-another-branch | 643 | branch: yet-another-branch |
640 | tag: tip | 644 | tag: tip |
641 | topic: mytopic | 645 | topic: mytopic |
642 | user: test | 646 | user: test |
643 | date: Thu Jan 01 00:00:00 1970 +0000 | 647 | date: Thu Jan 01 00:00:00 1970 +0000 |
644 | summary: To be splitted again | 648 | summary: To be splitted again |
645 | | 649 | |
646 @ changeset: 23:56a59faa8af7 | 650 @ changeset: 26:56a59faa8af7 |
647 | branch: another-branch | 651 | branch: another-branch |
648 ~ topic: mytopic | 652 ~ topic: mytopic |
649 user: test | 653 user: test |
650 date: Thu Jan 01 00:00:00 1970 +0000 | 654 date: Thu Jan 01 00:00:00 1970 +0000 |
651 summary: split10 | 655 summary: split10 |