Mercurial > evolve
comparison tests/test-evolve.t @ 1141:ca17770d2ee9
evolve: preserve branch change
evolve will now preserve branch change. If the evolved changeset had a different
phases than its parent, this branch name will be preserved. This allow
propagation of branch change during amend but do not overwrite special branch
name on children,
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sat, 01 Nov 2014 13:48:34 +0000 |
parents | 8b3b0549a4b6 |
children | 5951969400ce |
comparison
equal
deleted
inserted
replaced
1140:b7d85cd8ec7b | 1141:ca17770d2ee9 |
---|---|
768 17 - dba606655966 A longer | 768 17 - dba606655966 A longer |
769 commit message (draft) | 769 commit message (draft) |
770 7 - 5c9c8d9c2e4e another feature (child of ba0ec09b1bab) (public) | 770 7 - 5c9c8d9c2e4e another feature (child of ba0ec09b1bab) (public) |
771 6 - ba0ec09b1bab a nifty feature (public) | 771 6 - ba0ec09b1bab a nifty feature (public) |
772 0 - e55e0562ee93 base (public) | 772 0 - e55e0562ee93 base (public) |
773 | |
774 $ cd .. | |
775 | |
776 Test branch preservation: | |
777 =========================== | |
778 | |
779 $ hg init evolving-branch | |
780 $ cd evolving-branch | |
781 $ touch a | |
782 $ hg add a | |
783 $ hg ci -m 'a0' | |
784 $ echo 1 > a | |
785 $ hg ci -m 'a1' | |
786 $ echo 2 > a | |
787 $ hg ci -m 'a2' | |
788 $ echo 3 > a | |
789 $ hg ci -m 'a3' | |
790 | |
791 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' | |
792 @ 3 [default] a3 | |
793 | | |
794 o 2 [default] a2 | |
795 | | |
796 o 1 [default] a1 | |
797 | | |
798 o 0 [default] a0 | |
799 | |
800 | |
801 branch change propagated | |
802 | |
803 $ hg up 'desc(a2)' | |
804 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
805 $ hg branch mybranch | |
806 marked working directory as branch mybranch | |
807 (branches are permanent and global, did you want a bookmark?) | |
808 $ hg amend | |
809 1 new unstable changesets | |
810 | |
811 $ hg evolve | |
812 move:[3] a3 | |
813 atop:[5] a2 | |
814 working directory is now at 7c5649f73d11 | |
815 | |
816 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' | |
817 @ 6 [mybranch] a3 | |
818 | | |
819 o 5 [mybranch] a2 | |
820 | | |
821 o 1 [default] a1 | |
822 | | |
823 o 0 [default] a0 | |
824 | |
825 | |
826 branch change preserved | |
827 | |
828 $ hg up 'desc(a1)' | |
829 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
830 $ hg amend -m 'a1_' | |
831 2 new unstable changesets | |
832 $ hg evolve | |
833 move:[5] a2 | |
834 atop:[7] a1_ | |
835 working directory is now at 5406c5cfee42 | |
836 $ hg evolve | |
837 move:[6] a3 | |
838 atop:[8] a2 | |
839 working directory is now at c7661e655801 | |
840 $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' | |
841 @ 9 [mybranch] a3 | |
842 | | |
843 o 8 [mybranch] a2 | |
844 | | |
845 o 7 [default] a1_ | |
846 | | |
847 o 0 [default] a0 | |
848 |