comparison tests/test-push-warn.t @ 42203:5997eabc7b85

push: added clear warning message when pushing closed branches(issue6080) Differential Revision: https://phab.mercurial-scm.org/D6038
author Taapas Agrawal <taapas2897@gmail.com>
date Fri, 01 Mar 2019 05:56:18 +0530
parents 5abc47d4ca6b
children 8d72e29ad1e0
comparison
equal deleted inserted replaced
42202:8d14d91584f1 42203:5997eabc7b85
789 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'! 789 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
790 (merge or see 'hg help push' for details about pushing new heads) 790 (merge or see 'hg help push' for details about pushing new heads)
791 [255] 791 [255]
792 792
793 $ cd .. 793 $ cd ..
794
795 Test regarding pushing of closed branch/branches(Issue6080)
796
797 $ hg init x
798 $ cd x
799 $ hg -q branch a
800 $ echo 0 > foo
801 $ hg -q ci -Am 0
802 $ hg -q up 0
803 $ cd ..
804
805 $ hg -q clone x z
806 $ cd z
807
808 When there is a single closed branch
809
810 $ hg -q branch foo
811 $ echo 0 > foo
812 $ hg -q ci -Am 0
813 $ hg ci --close-branch -m 'closing branch foo'
814 $ hg -q up 0
815 $ hg push ../x
816 pushing to ../x
817 searching for changes
818 abort: push creates new remote branches: foo (1 closed)!
819 (use 'hg push --new-branch' to create new remote branches)
820 [255]
821
822 When there is more than one closed branches
823 $ hg -q branch bar
824 $ echo 0 > bar
825 $ hg -q ci -Am 0
826 $ hg ci --close-branch -m 'closing branch bar'
827 $ hg -q up 0
828 $ hg push ../x
829 pushing to ../x
830 searching for changes
831 abort: push creates new remote branches: bar, foo (2 closed)!
832 (use 'hg push --new-branch' to create new remote branches)
833 [255]
834
835 When there are more than one new branches and not all are closed
836 $ hg -q branch bar1
837 $ echo 0 > bar1
838 $ hg -q ci -Am 0
839 $ hg -q up 0
840 $ hg push ../x
841 pushing to ../x
842 searching for changes
843 abort: push creates new remote branches: bar, bar1, foo (2 closed)!
844 (use 'hg push --new-branch' to create new remote branches)
845 [255]
846
847 $ cd ..