66 $ hg push ../a |
66 $ hg push ../a |
67 pushing to ../a |
67 pushing to ../a |
68 searching for changes |
68 searching for changes |
69 abort: push creates new remote head 1e108cc5548c |
69 abort: push creates new remote head 1e108cc5548c |
70 (merge or see 'hg help push' for details about pushing new heads) |
70 (merge or see 'hg help push' for details about pushing new heads) |
71 [255] |
71 [20] |
72 |
72 |
73 $ hg merge |
73 $ hg merge |
74 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
74 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
75 (branch merge, don't forget to commit) |
75 (branch merge, don't forget to commit) |
76 |
76 |
132 $ hg push -r 3 ../c |
132 $ hg push -r 3 ../c |
133 pushing to ../c |
133 pushing to ../c |
134 searching for changes |
134 searching for changes |
135 abort: push creates new remote head a5dda829a167 |
135 abort: push creates new remote head a5dda829a167 |
136 (merge or see 'hg help push' for details about pushing new heads) |
136 (merge or see 'hg help push' for details about pushing new heads) |
137 [255] |
137 [20] |
138 |
138 |
139 $ hg push -v -r 3 -r 4 ../c |
139 $ hg push -v -r 3 -r 4 ../c |
140 pushing to ../c |
140 pushing to ../c |
141 searching for changes |
141 searching for changes |
142 new remote heads on branch 'default': |
142 new remote heads on branch 'default': |
143 a5dda829a167 |
143 a5dda829a167 |
144 ee8fbc7a0295 |
144 ee8fbc7a0295 |
145 abort: push creates new remote head a5dda829a167 |
145 abort: push creates new remote head a5dda829a167 |
146 (merge or see 'hg help push' for details about pushing new heads) |
146 (merge or see 'hg help push' for details about pushing new heads) |
147 [255] |
147 [20] |
148 |
148 |
149 $ hg push -v -f -r 3 -r 4 ../c |
149 $ hg push -v -f -r 3 -r 4 ../c |
150 pushing to ../c |
150 pushing to ../c |
151 searching for changes |
151 searching for changes |
152 2 changesets found |
152 2 changesets found |
232 $ hg push ../f |
232 $ hg push ../f |
233 pushing to ../f |
233 pushing to ../f |
234 searching for changes |
234 searching for changes |
235 abort: push creates new remote branches: c |
235 abort: push creates new remote branches: c |
236 (use 'hg push --new-branch' to create new remote branches) |
236 (use 'hg push --new-branch' to create new remote branches) |
237 [255] |
237 [20] |
238 |
238 |
239 $ hg push -r 4 -r 5 ../f |
239 $ hg push -r 4 -r 5 ../f |
240 pushing to ../f |
240 pushing to ../f |
241 searching for changes |
241 searching for changes |
242 abort: push creates new remote branches: c |
242 abort: push creates new remote branches: c |
243 (use 'hg push --new-branch' to create new remote branches) |
243 (use 'hg push --new-branch' to create new remote branches) |
244 [255] |
244 [20] |
245 |
245 |
246 |
246 |
247 Multiple new branches: |
247 Multiple new branches: |
248 |
248 |
249 $ hg -q branch d |
249 $ hg -q branch d |
253 $ hg push ../f |
253 $ hg push ../f |
254 pushing to ../f |
254 pushing to ../f |
255 searching for changes |
255 searching for changes |
256 abort: push creates new remote branches: c, d |
256 abort: push creates new remote branches: c, d |
257 (use 'hg push --new-branch' to create new remote branches) |
257 (use 'hg push --new-branch' to create new remote branches) |
258 [255] |
258 [20] |
259 |
259 |
260 $ hg push -r 4 -r 6 ../f |
260 $ hg push -r 4 -r 6 ../f |
261 pushing to ../f |
261 pushing to ../f |
262 searching for changes |
262 searching for changes |
263 abort: push creates new remote branches: c, d |
263 abort: push creates new remote branches: c, d |
264 (use 'hg push --new-branch' to create new remote branches) |
264 (use 'hg push --new-branch' to create new remote branches) |
265 [255] |
265 [20] |
266 |
266 |
267 $ cd ../g |
267 $ cd ../g |
268 |
268 |
269 |
269 |
270 Fail on multiple head push: |
270 Fail on multiple head push: |
276 $ hg push -r 4 -r 7 ../f |
276 $ hg push -r 4 -r 7 ../f |
277 pushing to ../f |
277 pushing to ../f |
278 searching for changes |
278 searching for changes |
279 abort: push creates new remote head 0b715ef6ff8f on branch 'a' |
279 abort: push creates new remote head 0b715ef6ff8f on branch 'a' |
280 (merge or see 'hg help push' for details about pushing new heads) |
280 (merge or see 'hg help push' for details about pushing new heads) |
281 [255] |
281 [20] |
282 |
282 |
283 Push replacement head on existing branches: |
283 Push replacement head on existing branches: |
284 |
284 |
285 $ hg -q up 3 |
285 $ hg -q up 3 |
286 $ echo 8 > foo |
286 $ echo 8 > foo |
353 $ hg push -r 12 -r 13 ../f |
353 $ hg push -r 12 -r 13 ../f |
354 pushing to ../f |
354 pushing to ../f |
355 searching for changes |
355 searching for changes |
356 abort: push creates new remote branches: e |
356 abort: push creates new remote branches: e |
357 (use 'hg push --new-branch' to create new remote branches) |
357 (use 'hg push --new-branch' to create new remote branches) |
358 [255] |
358 [20] |
359 |
359 |
360 |
360 |
361 Using --new-branch to push new named branch: |
361 Using --new-branch to push new named branch: |
362 |
362 |
363 $ hg push --new-branch -r 12 -r 13 ../f |
363 $ hg push --new-branch -r 12 -r 13 ../f |
381 $ hg push --branch f --new-branch ../f |
381 $ hg push --branch f --new-branch ../f |
382 pushing to ../f |
382 pushing to ../f |
383 searching for changes |
383 searching for changes |
384 abort: push creates new branch 'f' with multiple heads |
384 abort: push creates new branch 'f' with multiple heads |
385 (merge or see 'hg help push' for details about pushing new heads) |
385 (merge or see 'hg help push' for details about pushing new heads) |
386 [255] |
386 [20] |
387 $ hg push --branch f --new-branch --force ../f |
387 $ hg push --branch f --new-branch --force ../f |
388 pushing to ../f |
388 pushing to ../f |
389 searching for changes |
389 searching for changes |
390 adding changesets |
390 adding changesets |
391 adding manifests |
391 adding manifests |
425 pushing to h |
425 pushing to h |
426 searching for changes |
426 searching for changes |
427 remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
427 remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
428 abort: push creates new remote head 97bd0c84d346 |
428 abort: push creates new remote head 97bd0c84d346 |
429 (pull and merge or see 'hg help push' for details about pushing new heads) |
429 (pull and merge or see 'hg help push' for details about pushing new heads) |
430 [255] |
430 [20] |
431 $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx |
431 $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx |
432 $ hg -R i push h |
432 $ hg -R i push h |
433 pushing to h |
433 pushing to h |
434 searching for changes |
434 searching for changes |
435 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others |
435 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others |
436 abort: push creates new remote head 97bd0c84d346 |
436 abort: push creates new remote head 97bd0c84d346 |
437 (pull and merge or see 'hg help push' for details about pushing new heads) |
437 (pull and merge or see 'hg help push' for details about pushing new heads) |
438 [255] |
438 [20] |
439 $ hg -R i push h -v |
439 $ hg -R i push h -v |
440 pushing to h |
440 pushing to h |
441 searching for changes |
441 searching for changes |
442 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
442 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847 |
443 new remote heads on branch 'default': |
443 new remote heads on branch 'default': |
444 97bd0c84d346 |
444 97bd0c84d346 |
445 abort: push creates new remote head 97bd0c84d346 |
445 abort: push creates new remote head 97bd0c84d346 |
446 (pull and merge or see 'hg help push' for details about pushing new heads) |
446 (pull and merge or see 'hg help push' for details about pushing new heads) |
447 [255] |
447 [20] |
448 |
448 |
449 |
449 |
450 Check prepush logic with merged branches: |
450 Check prepush logic with merged branches: |
451 |
451 |
452 $ hg init j |
452 $ hg init j |
477 $ hg -R k push -r a j |
477 $ hg -R k push -r a j |
478 pushing to j |
478 pushing to j |
479 searching for changes |
479 searching for changes |
480 abort: push creates new remote branches: b |
480 abort: push creates new remote branches: b |
481 (use 'hg push --new-branch' to create new remote branches) |
481 (use 'hg push --new-branch' to create new remote branches) |
482 [255] |
482 [20] |
483 |
483 |
484 |
484 |
485 Prepush -r should not allow you to sneak in new heads: |
485 Prepush -r should not allow you to sneak in new heads: |
486 |
486 |
487 $ hg init l |
487 $ hg init l |
763 $ hg push inner |
763 $ hg push inner |
764 pushing to inner |
764 pushing to inner |
765 searching for changes |
765 searching for changes |
766 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A' |
766 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A' |
767 (merge or see 'hg help push' for details about pushing new heads) |
767 (merge or see 'hg help push' for details about pushing new heads) |
768 [255] |
768 [20] |
769 |
769 |
770 $ hg push inner -r4 -r5 |
770 $ hg push inner -r4 -r5 |
771 pushing to inner |
771 pushing to inner |
772 searching for changes |
772 searching for changes |
773 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A' |
773 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A' |
774 (merge or see 'hg help push' for details about pushing new heads) |
774 (merge or see 'hg help push' for details about pushing new heads) |
775 [255] |
775 [20] |
776 |
776 |
777 $ hg in inner |
777 $ hg in inner |
778 comparing with inner |
778 comparing with inner |
779 searching for changes |
779 searching for changes |
780 no changes found |
780 no changes found |
786 pushing to inner |
786 pushing to inner |
787 searching for changes |
787 searching for changes |
788 running fail-push hook |
788 running fail-push hook |
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 [20] |
792 |
792 |
793 $ cd .. |
793 $ cd .. |
794 |
794 |
795 Test regarding pushing of closed branch/branches(Issue6080) |
795 Test regarding pushing of closed branch/branches(Issue6080) |
796 |
796 |
828 $ hg push ../x |
828 $ hg push ../x |
829 pushing to ../x |
829 pushing to ../x |
830 searching for changes |
830 searching for changes |
831 abort: push creates new remote branches: bar, foo (2 closed) |
831 abort: push creates new remote branches: bar, foo (2 closed) |
832 (use 'hg push --new-branch' to create new remote branches) |
832 (use 'hg push --new-branch' to create new remote branches) |
833 [255] |
833 [20] |
834 |
834 |
835 When there are more than one new branches and not all are closed |
835 When there are more than one new branches and not all are closed |
836 $ hg -q branch bar1 |
836 $ hg -q branch bar1 |
837 $ echo 0 > bar1 |
837 $ echo 0 > bar1 |
838 $ hg -q ci -Am 0 |
838 $ hg -q ci -Am 0 |