Mercurial > evolve
comparison tests/test-topic.t @ 2679:5156a67f66a6
topics: update current topic to the topic of newly rebased commit (issue5551)
The rebase code passes branchmerge equals to True while updating to the rebased
commit. We need to make sure topic is preserved even after rebase and hence we
need to update the topic even when branchmerge argument is set to True. But
there is a twist in the tale, merge also uses this part of code and we allow to
update topic when brancmerge is True, in merge cases the topic after merge will
the topic of the destination commit, not the topic of working directory parent.
So we need the function to have information about whether a rebase is going on,
and we do it by wrapping the rebase command and storing some value in the
config. This is a bit hacky but works for now. This patch fixes issue related to
loosing of topic while rebase.
Thanks to Boris Feld for the rigourous tests.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 29 Jun 2017 02:31:55 +0530 |
parents | 0ade6e87346b |
children | 9b68a2083dac |
comparison
equal
deleted
inserted
replaced
2678:da2b3e5e4f69 | 2679:5156a67f66a6 |
---|---|
628 wat | 628 wat |
629 $ hg rebase -d tip -s . | 629 $ hg rebase -d tip -s . |
630 rebasing 12:18b70b8de1f0 "fran?" | 630 rebasing 12:18b70b8de1f0 "fran?" |
631 switching to topic wat | 631 switching to topic wat |
632 $ hg topic | 632 $ hg topic |
633 * wat | 633 wat |
634 | 634 |
635 $ hg log -Gr 'draft()' | 635 $ hg log -Gr 'draft()' |
636 @ changeset: 14:503497a14c3e | 636 @ changeset: 14:45358f7a5892 |
637 | tag: tip | 637 | tag: tip |
638 | topic: wat | |
639 | user: test | 638 | user: test |
640 | date: Thu Jan 01 00:00:00 1970 +0000 | 639 | date: Thu Jan 01 00:00:00 1970 +0000 |
641 | summary: fran? | 640 | summary: fran? |
642 | | 641 | |
643 o changeset: 13:686a642006db | 642 o changeset: 13:686a642006db |
651 Amend a topic | 650 Amend a topic |
652 | 651 |
653 $ hg topic watwat | 652 $ hg topic watwat |
654 $ hg ci --amend | 653 $ hg ci --amend |
655 $ hg log -Gr 'draft()' | 654 $ hg log -Gr 'draft()' |
656 @ changeset: 16:024d9c69f30f | 655 @ changeset: 16:6c40a4c21bbe |
657 | tag: tip | 656 | tag: tip |
658 | topic: watwat | 657 | topic: watwat |
659 | parent: 13:686a642006db | 658 | parent: 13:686a642006db |
660 | user: test | 659 | user: test |
661 | date: Thu Jan 01 00:00:00 1970 +0000 | 660 | date: Thu Jan 01 00:00:00 1970 +0000 |
672 Clear and amend: | 671 Clear and amend: |
673 | 672 |
674 $ hg topic --clear | 673 $ hg topic --clear |
675 $ hg ci --amend | 674 $ hg ci --amend |
676 $ hg log -r . | 675 $ hg log -r . |
677 changeset: 18:573ab57c6de2 | 676 changeset: 18:0f9cd5070654 |
678 tag: tip | 677 tag: tip |
679 parent: 13:686a642006db | 678 parent: 13:686a642006db |
680 user: test | 679 user: test |
681 date: Thu Jan 01 00:00:00 1970 +0000 | 680 date: Thu Jan 01 00:00:00 1970 +0000 |
682 summary: fran? | 681 summary: fran? |
688 | 687 |
689 Testing issue5441 | 688 Testing issue5441 |
690 $ hg co 19 | 689 $ hg co 19 |
691 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 690 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
692 $ hg log -Gr 'draft()' | 691 $ hg log -Gr 'draft()' |
693 @ changeset: 19:2539ecb09b37 | 692 @ changeset: 19:980a0f608481 |
694 | tag: tip | 693 | tag: tip |
695 | topic: watwat | 694 | topic: watwat |
696 | parent: 13:686a642006db | 695 | parent: 13:686a642006db |
697 | user: test | 696 | user: test |
698 | date: Thu Jan 01 00:00:00 1970 +0000 | 697 | date: Thu Jan 01 00:00:00 1970 +0000 |
709 $ hg topics --rev '13::19' changewat | 708 $ hg topics --rev '13::19' changewat |
710 switching to topic changewat | 709 switching to topic changewat |
711 changed topic on 2 changes | 710 changed topic on 2 changes |
712 please run hg evolve --rev "topic(changewat)" now | 711 please run hg evolve --rev "topic(changewat)" now |
713 $ hg log -Gr 'draft()' | 712 $ hg log -Gr 'draft()' |
714 @ changeset: 21:993d145391f5 | 713 @ changeset: 21:56c83be6105f |
715 | tag: tip | 714 | tag: tip |
716 | topic: changewat | 715 | topic: changewat |
717 | user: test | 716 | user: test |
718 | date: Thu Jan 01 00:00:00 1970 +0000 | 717 | date: Thu Jan 01 00:00:00 1970 +0000 |
719 | summary: fran? | 718 | summary: fran? |
741 | parent: 20:ceba5be9d56f | 740 | parent: 20:ceba5be9d56f |
742 | user: test | 741 | user: test |
743 | date: Thu Jan 01 00:00:00 1970 +0000 | 742 | date: Thu Jan 01 00:00:00 1970 +0000 |
744 | summary: gamma | 743 | summary: gamma |
745 | | 744 | |
746 | o changeset: 21:993d145391f5 | 745 | o changeset: 21:56c83be6105f |
747 |/ topic: changewat | 746 |/ topic: changewat |
748 | user: test | 747 | user: test |
749 | date: Thu Jan 01 00:00:00 1970 +0000 | 748 | date: Thu Jan 01 00:00:00 1970 +0000 |
750 | summary: fran? | 749 | summary: fran? |
751 | | 750 | |
767 | parent: 23:62e49f09f883 | 766 | parent: 23:62e49f09f883 |
768 | user: test | 767 | user: test |
769 | date: Thu Jan 01 00:00:00 1970 +0000 | 768 | date: Thu Jan 01 00:00:00 1970 +0000 |
770 | summary: gamma | 769 | summary: gamma |
771 | | 770 | |
772 | o changeset: 24:658ae31a0c05 | 771 | o changeset: 24:369c6e2e5474 |
773 |/ topic: changewut | 772 |/ topic: changewut |
774 | user: test | 773 | user: test |
775 | date: Thu Jan 01 00:00:00 1970 +0000 | 774 | date: Thu Jan 01 00:00:00 1970 +0000 |
776 | summary: fran? | 775 | summary: fran? |
777 | | 776 | |