##// END OF EJS Templates
bundle: introduce a --exact option...
marmoute -
r50305:2bbd7bc7 default
parent child Browse files
Show More
@@ -1484,6 +1484,13 b' def branches(ui, repo, active=False, clo'
1484 1484 @command(
1485 1485 b'bundle',
1486 1486 [
1487
1488 (
1489 b'',
1490 b'exact',
1491 None,
1492 _(b'compute the base from the revision specified'),
1493 ),
1487 1494 (
1488 1495 b'f',
1489 1496 b'force',
@@ -1553,6 +1560,7 b' def bundle(ui, repo, fname, *dests, **op'
1553 1560 Returns 0 on success, 1 if no changes found.
1554 1561 """
1555 1562 opts = pycompat.byteskwargs(opts)
1563
1556 1564 revs = None
1557 1565 if b'rev' in opts:
1558 1566 revstrings = opts[b'rev']
@@ -1586,7 +1594,19 b' def bundle(ui, repo, fname, *dests, **op'
1586 1594 )
1587 1595 if opts.get(b'base'):
1588 1596 ui.warn(_(b"ignoring --base because --all was specified\n"))
1597 if opts.get(b'exact'):
1598 ui.warn(_(b"ignoring --exact because --all was specified\n"))
1589 1599 base = [nullrev]
1600 elif opts.get(b'exact'):
1601 if dests:
1602 raise error.InputError(
1603 _(b"--exact is incompatible with specifying destinations")
1604 )
1605 if opts.get(b'base'):
1606 ui.warn(_(b"ignoring --base because --exact was specified\n"))
1607 base = repo.revs(b'parents(%ld) - %ld', revs, revs)
1608 if not base:
1609 base = [nullrev]
1590 1610 else:
1591 1611 base = logcmdutil.revrange(repo, opts.get(b'base'))
1592 1612 if cgversion not in changegroup.supportedoutgoingversions(repo):
@@ -718,7 +718,7 b' Unbundle incremental bundles into fresh '
718 718 $ hg init empty
719 719 $ hg -R test bundle --base null -r 0 ../0.hg
720 720 1 changesets found
721 $ hg -R test bundle --base 0 -r 1 ../1.hg
721 $ hg -R test bundle --exact -r 1 ../1.hg
722 722 1 changesets found
723 723 $ hg -R empty unbundle -u ../0.hg ../1.hg
724 724 adding changesets
@@ -261,7 +261,7 b' Show all commands + options'
261 261 bookmarks: force, rev, delete, rename, inactive, list, template
262 262 branch: force, clean, rev
263 263 branches: active, closed, rev, template
264 bundle: force, rev, branch, base, all, type, ssh, remotecmd, insecure
264 bundle: exact, force, rev, branch, base, all, type, ssh, remotecmd, insecure
265 265 cat: output, rev, decode, include, exclude, template
266 266 clone: noupdate, updaterev, rev, branch, pull, uncompressed, stream, ssh, remotecmd, insecure
267 267 commit: addremove, close-branch, amend, secret, edit, force-close-branch, interactive, include, exclude, message, logfile, date, user, subrepos
General Comments 0
You need to be logged in to leave comments. Login now