Mercurial > public > mercurial-scm > hg-stable
diff tests/test-push-warn @ 11211:e43c23d189a5
push: add --new-branch option to allow intial push of new branches
Compare this to --force which allows anything to be pushed. With --new-branch,
only changesets to named branches not present on the and changesets not
introducing additional heads on existing branches are allowed.
Developed by
Henrik Stuart <henrik.stuart@edlund.dk>
Sune Foldager <cryo@cyanite.org>
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Fri, 21 May 2010 15:22:29 +0200 |
parents | a101a743c570 |
children | 4c94b6d0fb1c |
line wrap: on
line diff
--- a/tests/test-push-warn Fri May 21 22:53:57 2010 +0900 +++ b/tests/test-push-warn Fri May 21 15:22:29 2010 +0200 @@ -135,6 +135,18 @@ hg -q ci -d "1000000 0" -m 12 hg push -r 11 -r 12 ../f; echo $? +echo % failed push of new named branch +echo 12 > foo +hg -q ci -d "1000000 0" -m 12a +hg -q up 11 +echo 13 > foo +hg -q branch e +hg -q ci -d "1000000 0" -m 13d +hg push -r 12 -r 13 ../f; echo $? + +echo % using --new-branch to push new named branch +hg push --new-branch -r 12 -r 13 ../f; echo $? + echo % checking prepush logic does not allow silently pushing multiple new heads cd .. hg init h