comparison tests/test-split.t @ 6402:2cd36fe3f4e6 mercurial-4.9

test-compat: merge mercurial-5.0 into mercurial-4.9
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 07 Feb 2023 11:30:34 +0400
parents 5c921c26dc40 716912541759
children 567cc86f2d01 421993efcd69
comparison
equal deleted inserted replaced
6356:fb668d6019d4 6402:2cd36fe3f4e6
335 > [experimental] 335 > [experimental]
336 > evolution=createmarkers 336 > evolution=createmarkers
337 > evolutioncommands=split 337 > evolutioncommands=split
338 > EOF 338 > EOF
339 $ hg split -r "desc(split3)" 339 $ hg split -r "desc(split3)"
340 abort: split will orphan 4 descendants 340 abort: cannot split changeset, as that will orphan 4 descendants
341 (see 'hg help evolution.instability') 341 (see 'hg help evolution.instability')
342 [255] 342 [255]
343 343
344 Changing evolution level to createmarkers 344 Changing evolution level to createmarkers
345 $ echo "[experimental]" >> $HGRCPATH 345 $ echo "[experimental]" >> $HGRCPATH
377 > EOF 377 > EOF
378 abort: more than one revset is given 378 abort: more than one revset is given
379 [255] 379 [255]
380 380
381 Split empty commit (issue5191) 381 Split empty commit (issue5191)
382 $ hg branch new-branch 382 $ hg branch double//slash
383 marked working directory as branch new-branch 383 marked working directory as branch double//slash
384 (branches are permanent and global, did you want a bookmark?) 384 (branches are permanent and global, did you want a bookmark?)
385 $ hg commit -m "empty" 385 $ hg commit -m "empty"
386 $ hg split 386 $ hg split
387 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 387 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
388 388
402 $ hg add babar celeste 402 $ hg add babar celeste
403 $ hg commit -m "Works on mytopic" babar celeste --user victor 403 $ hg commit -m "Works on mytopic" babar celeste --user victor
404 active topic 'mytopic' grew its first changeset 404 active topic 'mytopic' grew its first changeset
405 (see 'hg help topics' for more information) 405 (see 'hg help topics' for more information)
406 $ hg log -r . 406 $ hg log -r .
407 changeset: 18:26f72cfaf036 407 changeset: 18:cdda6d69812b
408 branch: new-branch 408 branch: double//slash
409 tag: tip 409 tag: tip
410 topic: mytopic 410 topic: mytopic
411 user: victor 411 user: victor
412 date: Thu Jan 01 00:00:00 1970 +0000 412 date: Thu Jan 01 00:00:00 1970 +0000
413 summary: Works on mytopic 413 summary: Works on mytopic
414 414
415 $ hg summary 415 $ hg summary
416 parent: 18:26f72cfaf036 tip 416 parent: 18:cdda6d69812b tip
417 Works on mytopic 417 Works on mytopic
418 branch: new-branch:mytopic 418 branch: double//slash//mytopic
419 commit: (clean) 419 commit: (clean)
420 update: (current) 420 update: (current)
421 phases: 9 draft 421 phases: 9 draft
422 topic: mytopic 422 topic: mytopic
423 423
449 continue splitting? [Ycdq?] c 449 continue splitting? [Ycdq?] c
450 450
451 Check that the topic is still here 451 Check that the topic is still here
452 452
453 $ hg log -r "tip~1::" 453 $ hg log -r "tip~1::"
454 changeset: 19:addcf498f19e 454 changeset: 19:a12d854b94a2
455 branch: new-branch 455 branch: double//slash
456 topic: mytopic 456 topic: mytopic
457 parent: 17:fdb403258632 457 parent: 17:db45bd0f0e52
458 user: test 458 user: test
459 date: Thu Jan 01 00:00:00 1970 +0000 459 date: Thu Jan 01 00:00:00 1970 +0000
460 summary: split7 460 summary: split7
461 461
462 changeset: 20:2532b288af61 462 changeset: 20:98274aae3990
463 branch: new-branch 463 branch: double//slash
464 tag: tip 464 tag: tip
465 topic: mytopic 465 topic: mytopic
466 user: test 466 user: test
467 date: Thu Jan 01 00:00:00 1970 +0000 467 date: Thu Jan 01 00:00:00 1970 +0000
468 summary: split8 468 summary: split8
469 469
470 $ hg topic 470 $ hg topic
471 * mytopic (2 changesets) 471 * mytopic (2 changesets)
472
473 Check commit extras
474
475 $ hg log -r "tip~1::" -T '{rev}: {join(extras, " ")}\n'
476 19: branch=double//slash topic=mytopic
477 20: branch=double//slash topic=mytopic
472 478
473 Test split the first commit on a branch 479 Test split the first commit on a branch
474 480
475 $ touch SPLIT1 SPLIT2 481 $ touch SPLIT1 SPLIT2
476 $ hg add SPLIT1 SPLIT2 482 $ hg add SPLIT1 SPLIT2
477 $ hg branch another-branch 483 $ hg branch another-branch
478 marked working directory as branch another-branch 484 marked working directory as branch another-branch
479 $ hg commit -m "To be split" 485 $ hg commit -m "To be split"
480 $ hg log -G -l 3 486 $ hg log -G -l 3
481 @ changeset: 21:b6bf93dd314b 487 @ changeset: 21:1b89fbf4d770
482 | branch: another-branch 488 | branch: another-branch
483 | tag: tip 489 | tag: tip
484 | topic: mytopic 490 | topic: mytopic
485 | user: test 491 | user: test
486 | date: Thu Jan 01 00:00:00 1970 +0000 492 | date: Thu Jan 01 00:00:00 1970 +0000
487 | summary: To be split 493 | summary: To be split
488 | 494 |
489 o changeset: 20:2532b288af61 495 o changeset: 20:98274aae3990
490 | branch: new-branch 496 | branch: double//slash
491 | topic: mytopic 497 | topic: mytopic
492 | user: test 498 | user: test
493 | date: Thu Jan 01 00:00:00 1970 +0000 499 | date: Thu Jan 01 00:00:00 1970 +0000
494 | summary: split8 500 | summary: split8
495 | 501 |
496 o changeset: 19:addcf498f19e 502 o changeset: 19:a12d854b94a2
497 | branch: new-branch 503 | branch: double//slash
498 ~ topic: mytopic 504 ~ topic: mytopic
499 parent: 17:fdb403258632 505 parent: 17:db45bd0f0e52
500 user: test 506 user: test
501 date: Thu Jan 01 00:00:00 1970 +0000 507 date: Thu Jan 01 00:00:00 1970 +0000
502 summary: split7 508 summary: split7
503 509
504 $ hg export . 510 $ hg export .
505 # HG changeset patch 511 # HG changeset patch
506 # User test 512 # User test
507 # Date 0 0 513 # Date 0 0
508 # Thu Jan 01 00:00:00 1970 +0000 514 # Thu Jan 01 00:00:00 1970 +0000
509 # Branch another-branch 515 # Branch another-branch
510 # Node ID b6bf93dd314ba47b838befc7488b2223981684ea 516 # Node ID 1b89fbf4d770c8fad85b73aada92425c00ad3a58
511 # Parent 2532b288af61bd19239a95ae2a3ecb9b0ad4b8e1 517 # Parent 98274aae39908fc11c1cf42c381935cfbe94695e
512 # EXP-Topic mytopic 518 # EXP-Topic mytopic
513 To be split 519 To be split
514 520
515 diff --git a/SPLIT1 b/SPLIT1 521 diff --git a/SPLIT1 b/SPLIT1
516 new file mode 100644 522 new file mode 100644
541 547
542 no more changes to split 548 no more changes to split
543 549
544 The split changesets should be on the 'another-branch' 550 The split changesets should be on the 'another-branch'
545 $ hg log -G -l 3 551 $ hg log -G -l 3
546 @ changeset: 23:56a59faa8af7 552 @ changeset: 23:492ea8acc08d
547 | branch: another-branch 553 | branch: another-branch
548 | tag: tip 554 | tag: tip
549 | topic: mytopic 555 | topic: mytopic
550 | user: test 556 | user: test
551 | date: Thu Jan 01 00:00:00 1970 +0000 557 | date: Thu Jan 01 00:00:00 1970 +0000
552 | summary: split10 558 | summary: split10
553 | 559 |
554 o changeset: 22:75695e3e2300 560 o changeset: 22:35c3b7b7f830
555 | branch: another-branch 561 | branch: another-branch
556 | topic: mytopic 562 | topic: mytopic
557 | parent: 20:2532b288af61 563 | parent: 20:98274aae3990
558 | user: test 564 | user: test
559 | date: Thu Jan 01 00:00:00 1970 +0000 565 | date: Thu Jan 01 00:00:00 1970 +0000
560 | summary: split9 566 | summary: split9
561 | 567 |
562 o changeset: 20:2532b288af61 568 o changeset: 20:98274aae3990
563 | branch: new-branch 569 | branch: double//slash
564 ~ topic: mytopic 570 ~ topic: mytopic
565 user: test 571 user: test
566 date: Thu Jan 01 00:00:00 1970 +0000 572 date: Thu Jan 01 00:00:00 1970 +0000
567 summary: split8 573 summary: split8
568 574
577 583
578 $ hg up "tip~1" 584 $ hg up "tip~1"
579 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 585 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
580 586
581 $ hg log -G -l 2 587 $ hg log -G -l 2
582 o changeset: 24:9f56497dbac1 588 o changeset: 24:5e7c5b766d1e
583 | branch: yet-another-branch 589 | branch: yet-another-branch
584 | tag: tip 590 | tag: tip
585 | topic: mytopic 591 | topic: mytopic
586 | user: test 592 | user: test
587 | date: Thu Jan 01 00:00:00 1970 +0000 593 | date: Thu Jan 01 00:00:00 1970 +0000
588 | summary: To be split again 594 | summary: To be split again
589 | 595 |
590 @ changeset: 23:56a59faa8af7 596 @ changeset: 23:492ea8acc08d
591 | branch: another-branch 597 | branch: another-branch
592 ~ topic: mytopic 598 ~ topic: mytopic
593 user: test 599 user: test
594 date: Thu Jan 01 00:00:00 1970 +0000 600 date: Thu Jan 01 00:00:00 1970 +0000
595 summary: split10 601 summary: split10
617 623
618 $ hg branch 624 $ hg branch
619 another-branch 625 another-branch
620 626
621 $ hg log -G -l 2 627 $ hg log -G -l 2
622 o changeset: 24:9f56497dbac1 628 o changeset: 24:5e7c5b766d1e
623 | branch: yet-another-branch 629 | branch: yet-another-branch
624 | tag: tip 630 | tag: tip
625 | topic: mytopic 631 | topic: mytopic
626 | user: test 632 | user: test
627 | date: Thu Jan 01 00:00:00 1970 +0000 633 | date: Thu Jan 01 00:00:00 1970 +0000
628 | summary: To be split again 634 | summary: To be split again
629 | 635 |
630 @ changeset: 23:56a59faa8af7 636 @ changeset: 23:492ea8acc08d
631 | branch: another-branch 637 | branch: another-branch
632 ~ topic: mytopic 638 ~ topic: mytopic
633 user: test 639 user: test
634 date: Thu Jan 01 00:00:00 1970 +0000 640 date: Thu Jan 01 00:00:00 1970 +0000
635 summary: split10 641 summary: split10
693 # HG changeset patch 699 # HG changeset patch
694 # User test 700 # User test
695 # Date 0 0 701 # Date 0 0
696 # Thu Jan 01 00:00:00 1970 +0000 702 # Thu Jan 01 00:00:00 1970 +0000
697 # Branch another-branch 703 # Branch another-branch
698 # Node ID 56a59faa8af70dc104faa905231731ffece5f18a 704 # Node ID 492ea8acc08dae0fce72cc459218dba9043e0481
699 # Parent 75695e3e2300d316cc515c4c25bab8b825ef1433 705 # Parent 35c3b7b7f83057a63307bb44ec59aebbba33c0f1
700 # EXP-Topic mytopic 706 # EXP-Topic mytopic
701 split10 707 split10
702 708
703 diff --git a/SPLIT2 b/SPLIT2 709 diff --git a/SPLIT2 b/SPLIT2
704 new file mode 100644 710 new file mode 100644
709 # HG changeset patch 715 # HG changeset patch
710 # User test 716 # User test
711 # Date 0 0 717 # Date 0 0
712 # Thu Jan 01 00:00:00 1970 +0000 718 # Thu Jan 01 00:00:00 1970 +0000
713 # Branch another-branch 719 # Branch another-branch
714 # Node ID 3acb634dc68ddb4dea75a9cee982955bc1f3e8cd 720 # Node ID 1110f02dec0746d3b0493e7a09051816f7bc3179
715 # Parent 75695e3e2300d316cc515c4c25bab8b825ef1433 721 # Parent 35c3b7b7f83057a63307bb44ec59aebbba33c0f1
716 # EXP-Topic mytopic 722 # EXP-Topic mytopic
717 split10 723 split10
718 724
719 diff --git a/SPLIT2 b/SPLIT2 725 diff --git a/SPLIT2 b/SPLIT2
720 new file mode 100644 726 new file mode 100644
743 # HG changeset patch 749 # HG changeset patch
744 # User test 750 # User test
745 # Date 0 0 751 # Date 0 0
746 # Thu Jan 01 00:00:00 1970 +0000 752 # Thu Jan 01 00:00:00 1970 +0000
747 # Branch another-branch 753 # Branch another-branch
748 # Node ID db690d5566962489d65945c90b468b44e0b1507a 754 # Node ID 5aa51c542c1b03435a7b5b602a4953bbe3321511
749 # Parent 75695e3e2300d316cc515c4c25bab8b825ef1433 755 # Parent 35c3b7b7f83057a63307bb44ec59aebbba33c0f1
750 # EXP-Topic mytopic 756 # EXP-Topic mytopic
751 split12 757 split12
752 758
753 diff --git a/SPLIT2 b/SPLIT2 759 diff --git a/SPLIT2 b/SPLIT2
754 new file mode 100644 760 new file mode 100644