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