Show More
@@ -5391,6 +5391,7 b' def pull(ui, repo, source=b"default", **' | |||
|
5391 | 5391 | _(b'REV'), |
|
5392 | 5392 | ), |
|
5393 | 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 | 5396 | b'b', |
|
5396 | 5397 | b'branch', |
@@ -5447,7 +5448,8 b' def push(ui, repo, dest=None, **opts):' | |||
|
5447 | 5448 | If -B/--bookmark is used, the specified bookmarked revision, its |
|
5448 | 5449 | ancestors, and the bookmark will be pushed to the remote |
|
5449 | 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 | 5454 | Please see :hg:`help urls` for important details about ``ssh://`` |
|
5453 | 5455 | URLs. If DESTINATION is omitted, a default path will be used. |
@@ -5475,6 +5477,13 b' def push(ui, repo, dest=None, **opts):' | |||
|
5475 | 5477 | """ |
|
5476 | 5478 | |
|
5477 | 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 | 5487 | if opts.get(b'bookmark'): |
|
5479 | 5488 | ui.setconfig(b'bookmarks', b'pushing', opts[b'bookmark'], b'push') |
|
5480 | 5489 | for b in opts[b'bookmark']: |
@@ -1364,3 +1364,33 b' Pushing the bookmark "foo" now fails as ' | |||
|
1364 | 1364 | no changes found (ignored 1 secret changesets) |
|
1365 | 1365 | abort: cannot push bookmark foo as it points to a secret changeset |
|
1366 | 1366 | [255] |
|
1367 | ||
|
1368 | Test pushing all bookmarks | |
|
1369 | ||
|
1370 | $ hg init $TESTTMP/ab1 | |
|
1371 | $ cd $TESTTMP/ab1 | |
|
1372 | $ "$PYTHON" $TESTDIR/seq.py 1 5 | while read i; do | |
|
1373 | > echo $i > test && hg ci -Am test | |
|
1374 | > done | |
|
1375 | adding test | |
|
1376 | $ hg clone -U . ../ab2 | |
|
1377 | $ hg book -r 1 A; hg book -r 2 B; hg book -r 3 C | |
|
1378 | $ hg push ../ab2 | |
|
1379 | pushing to ../ab2 | |
|
1380 | searching for changes | |
|
1381 | no changes found | |
|
1382 | [1] | |
|
1383 | $ hg push --all-bookmarks -r 1 ../ab2 | |
|
1384 | abort: cannot specify both --all-bookmarks and --rev | |
|
1385 | [255] | |
|
1386 | $ hg push --all-bookmarks -B A ../ab2 | |
|
1387 | abort: cannot specify both --all-bookmarks and --bookmark | |
|
1388 | [255] | |
|
1389 | $ hg push --all-bookmarks ../ab2 | |
|
1390 | pushing to ../ab2 | |
|
1391 | searching for changes | |
|
1392 | no changes found | |
|
1393 | exporting bookmark A | |
|
1394 | exporting bookmark B | |
|
1395 | exporting bookmark C | |
|
1396 | [1] |
@@ -352,7 +352,7 b' Show all commands + options' | |||
|
352 | 352 | paths: template |
|
353 | 353 | phase: public, draft, secret, force, rev |
|
354 | 354 | pull: update, force, confirm, rev, bookmark, branch, ssh, remotecmd, insecure |
|
355 | push: force, rev, bookmark, branch, new-branch, pushvars, publish, ssh, remotecmd, insecure | |
|
355 | push: force, rev, bookmark, all-bookmarks, branch, new-branch, pushvars, publish, ssh, remotecmd, insecure | |
|
356 | 356 | recover: verify |
|
357 | 357 | remove: after, force, subrepos, include, exclude, dry-run |
|
358 | 358 | rename: after, at-rev, force, include, exclude, dry-run |
General Comments 0
You need to be logged in to leave comments.
Login now