Mercurial > evolve
comparison tests/test-topic.t @ 2624:fd602980f7ee
topics: make sure we commit on new parents while changing topics (issue5441)
While changing topics of a set of linear commits, we used to commit our new
changesets with new topic on parents of its predecessor i.e. changeset before
the topic change. If the topic of parent was also changed, that parent will
become obsolete and hence resulting the cnew commit in unstable state. For a set
of linear commits this repeats and we end up in a tree state as mentioned in the
bug.
This patch fixes the bug by checking whether the parent was obsoleted and if
yes, commit on the new parent.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 18 Jun 2017 03:23:46 +0530 |
parents | a263f4c0f2ee |
children | a9ca94defc29 |
comparison
equal
deleted
inserted
replaced
2623:a263f4c0f2ee | 2624:fd602980f7ee |
---|---|
677 | 677 |
678 $ hg topics --change '13::19' changewat | 678 $ hg topics --change '13::19' changewat |
679 changed topic on 2 changes | 679 changed topic on 2 changes |
680 please run hg evolve --rev "topic(changewat)" now | 680 please run hg evolve --rev "topic(changewat)" now |
681 $ hg log -Gr 'draft()' | 681 $ hg log -Gr 'draft()' |
682 o changeset: 21:3c7d84fcabcd | 682 o changeset: 21:58e15a6365ca |
683 | tag: tip | 683 | tag: tip |
684 | topic: changewat | 684 | topic: changewat |
685 | parent: 13:d91cd8fd490e | 685 | user: test |
686 | user: test | 686 | date: Thu Jan 01 00:00:00 1970 +0000 |
687 | date: Thu Jan 01 00:00:00 1970 +0000 | |
688 | trouble: unstable | |
689 | summary: fran? | 687 | summary: fran? |
690 | | 688 | |
691 | o changeset: 20:a96ac830b62e | 689 o changeset: 20:a96ac830b62e |
692 | | topic: changewat | 690 | topic: changewat |
693 | | parent: 3:a53952faf762 | 691 | parent: 3:a53952faf762 |
694 | | user: test | 692 | user: test |
695 | | date: Thu Jan 01 00:00:00 1970 +0000 | 693 | date: Thu Jan 01 00:00:00 1970 +0000 |
696 | | summary: start on fran | 694 | summary: start on fran |
697 | | | 695 | |
698 +---@ changeset: 19:b72b86a1f96b | 696 | @ changeset: 19:b72b86a1f96b |
699 | | topic: watwat | 697 | | topic: watwat |
700 | | parent: 13:d91cd8fd490e | 698 | | parent: 13:d91cd8fd490e |
701 | | user: test | 699 | | user: test |
702 | | date: Thu Jan 01 00:00:00 1970 +0000 | 700 | | date: Thu Jan 01 00:00:00 1970 +0000 |
703 | | summary: fran? | 701 | | summary: fran? |
704 | | | 702 | | |
705 x | changeset: 13:d91cd8fd490e | 703 | x changeset: 13:d91cd8fd490e |
706 |/ topic: wat | 704 |/ topic: wat |
707 | parent: 3:a53952faf762 | 705 | parent: 3:a53952faf762 |
708 | user: test | 706 | user: test |
709 | date: Thu Jan 01 00:00:00 1970 +0000 | 707 | date: Thu Jan 01 00:00:00 1970 +0000 |
710 | summary: start on fran | 708 | summary: start on fran |