##// 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 @command(
1484 @command(
1485 b'bundle',
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 b'f',
1495 b'f',
1489 b'force',
1496 b'force',
@@ -1553,6 +1560,7 b' def bundle(ui, repo, fname, *dests, **op'
1553 Returns 0 on success, 1 if no changes found.
1560 Returns 0 on success, 1 if no changes found.
1554 """
1561 """
1555 opts = pycompat.byteskwargs(opts)
1562 opts = pycompat.byteskwargs(opts)
1563
1556 revs = None
1564 revs = None
1557 if b'rev' in opts:
1565 if b'rev' in opts:
1558 revstrings = opts[b'rev']
1566 revstrings = opts[b'rev']
@@ -1586,7 +1594,19 b' def bundle(ui, repo, fname, *dests, **op'
1586 )
1594 )
1587 if opts.get(b'base'):
1595 if opts.get(b'base'):
1588 ui.warn(_(b"ignoring --base because --all was specified\n"))
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 base = [nullrev]
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 else:
1610 else:
1591 base = logcmdutil.revrange(repo, opts.get(b'base'))
1611 base = logcmdutil.revrange(repo, opts.get(b'base'))
1592 if cgversion not in changegroup.supportedoutgoingversions(repo):
1612 if cgversion not in changegroup.supportedoutgoingversions(repo):
@@ -718,7 +718,7 b' Unbundle incremental bundles into fresh '
718 $ hg init empty
718 $ hg init empty
719 $ hg -R test bundle --base null -r 0 ../0.hg
719 $ hg -R test bundle --base null -r 0 ../0.hg
720 1 changesets found
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 1 changesets found
722 1 changesets found
723 $ hg -R empty unbundle -u ../0.hg ../1.hg
723 $ hg -R empty unbundle -u ../0.hg ../1.hg
724 adding changesets
724 adding changesets
@@ -261,7 +261,7 b' Show all commands + options'
261 bookmarks: force, rev, delete, rename, inactive, list, template
261 bookmarks: force, rev, delete, rename, inactive, list, template
262 branch: force, clean, rev
262 branch: force, clean, rev
263 branches: active, closed, rev, template
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 cat: output, rev, decode, include, exclude, template
265 cat: output, rev, decode, include, exclude, template
266 clone: noupdate, updaterev, rev, branch, pull, uncompressed, stream, ssh, remotecmd, insecure
266 clone: noupdate, updaterev, rev, branch, pull, uncompressed, stream, ssh, remotecmd, insecure
267 commit: addremove, close-branch, amend, secret, edit, force-close-branch, interactive, include, exclude, message, logfile, date, user, subrepos
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