comparison 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
comparison
equal deleted inserted replaced
11210:0c0088881562 11211:e43c23d189a5
132 hg -q ci -d "1000000 0" -m 11 132 hg -q ci -d "1000000 0" -m 11
133 hg -q up 1 133 hg -q up 1
134 echo 12 > foo 134 echo 12 > foo
135 hg -q ci -d "1000000 0" -m 12 135 hg -q ci -d "1000000 0" -m 12
136 hg push -r 11 -r 12 ../f; echo $? 136 hg push -r 11 -r 12 ../f; echo $?
137
138 echo % failed push of new named branch
139 echo 12 > foo
140 hg -q ci -d "1000000 0" -m 12a
141 hg -q up 11
142 echo 13 > foo
143 hg -q branch e
144 hg -q ci -d "1000000 0" -m 13d
145 hg push -r 12 -r 13 ../f; echo $?
146
147 echo % using --new-branch to push new named branch
148 hg push --new-branch -r 12 -r 13 ../f; echo $?
137 149
138 echo % checking prepush logic does not allow silently pushing multiple new heads 150 echo % checking prepush logic does not allow silently pushing multiple new heads
139 cd .. 151 cd ..
140 hg init h 152 hg init h
141 echo init > h/init 153 echo init > h/init