equal
deleted
inserted
replaced
5389 [], |
5389 [], |
5390 _(b'a changeset intended to be included in the destination'), |
5390 _(b'a changeset intended to be included in the destination'), |
5391 _(b'REV'), |
5391 _(b'REV'), |
5392 ), |
5392 ), |
5393 (b'B', b'bookmark', [], _(b"bookmark to push"), _(b'BOOKMARK')), |
5393 (b'B', b'bookmark', [], _(b"bookmark to push"), _(b'BOOKMARK')), |
|
5394 (b'', b'all-bookmarks', None, _(b"push all bookmarks (EXPERIMENTAL)")), |
5394 ( |
5395 ( |
5395 b'b', |
5396 b'b', |
5396 b'branch', |
5397 b'branch', |
5397 [], |
5398 [], |
5398 _(b'a specific branch you would like to push'), |
5399 _(b'a specific branch you would like to push'), |
5445 will be pushed to the remote repository. |
5446 will be pushed to the remote repository. |
5446 |
5447 |
5447 If -B/--bookmark is used, the specified bookmarked revision, its |
5448 If -B/--bookmark is used, the specified bookmarked revision, its |
5448 ancestors, and the bookmark will be pushed to the remote |
5449 ancestors, and the bookmark will be pushed to the remote |
5449 repository. Specifying ``.`` is equivalent to specifying the active |
5450 repository. Specifying ``.`` is equivalent to specifying the active |
5450 bookmark's name. |
5451 bookmark's name. Use the --all-bookmarks option for pushing all |
|
5452 current bookmarks. |
5451 |
5453 |
5452 Please see :hg:`help urls` for important details about ``ssh://`` |
5454 Please see :hg:`help urls` for important details about ``ssh://`` |
5453 URLs. If DESTINATION is omitted, a default path will be used. |
5455 URLs. If DESTINATION is omitted, a default path will be used. |
5454 |
5456 |
5455 .. container:: verbose |
5457 .. container:: verbose |
5473 |
5475 |
5474 Returns 0 if push was successful, 1 if nothing to push. |
5476 Returns 0 if push was successful, 1 if nothing to push. |
5475 """ |
5477 """ |
5476 |
5478 |
5477 opts = pycompat.byteskwargs(opts) |
5479 opts = pycompat.byteskwargs(opts) |
|
5480 |
|
5481 if opts.get(b'all_bookmarks'): |
|
5482 cmdutil.check_incompatible_arguments( |
|
5483 opts, b'all_bookmarks', [b'bookmark', b'rev'], |
|
5484 ) |
|
5485 opts[b'bookmark'] = list(repo._bookmarks) |
|
5486 |
5478 if opts.get(b'bookmark'): |
5487 if opts.get(b'bookmark'): |
5479 ui.setconfig(b'bookmarks', b'pushing', opts[b'bookmark'], b'push') |
5488 ui.setconfig(b'bookmarks', b'pushing', opts[b'bookmark'], b'push') |
5480 for b in opts[b'bookmark']: |
5489 for b in opts[b'bookmark']: |
5481 # translate -B options to -r so changesets get pushed |
5490 # translate -B options to -r so changesets get pushed |
5482 b = repo._bookmarks.expandname(b) |
5491 b = repo._bookmarks.expandname(b) |