Show More
@@ -1592,13 +1592,13 b' def bundle(ui, repo, fname, *dests, **op' | |||||
1592 | _(b'packed bundles cannot be produced by "hg bundle"'), |
|
1592 | _(b'packed bundles cannot be produced by "hg bundle"'), | |
1593 | hint=_(b"use 'hg debugcreatestreamclonebundle'"), |
|
1593 | hint=_(b"use 'hg debugcreatestreamclonebundle'"), | |
1594 | ) |
|
1594 | ) | |
1595 |
|
1595 | base_opt = opts.get('base') | ||
1596 | if opts.get('all'): |
|
1596 | if opts.get('all'): | |
1597 | if dests: |
|
1597 | if dests: | |
1598 | raise error.InputError( |
|
1598 | raise error.InputError( | |
1599 | _(b"--all is incompatible with specifying destinations") |
|
1599 | _(b"--all is incompatible with specifying destinations") | |
1600 | ) |
|
1600 | ) | |
1601 |
if |
|
1601 | if base_opt: | |
1602 | ui.warn(_(b"ignoring --base because --all was specified\n")) |
|
1602 | ui.warn(_(b"ignoring --base because --all was specified\n")) | |
1603 | if opts.get('exact'): |
|
1603 | if opts.get('exact'): | |
1604 | ui.warn(_(b"ignoring --exact because --all was specified\n")) |
|
1604 | ui.warn(_(b"ignoring --exact because --all was specified\n")) | |
@@ -1608,19 +1608,24 b' def bundle(ui, repo, fname, *dests, **op' | |||||
1608 | raise error.InputError( |
|
1608 | raise error.InputError( | |
1609 | _(b"--exact is incompatible with specifying destinations") |
|
1609 | _(b"--exact is incompatible with specifying destinations") | |
1610 | ) |
|
1610 | ) | |
1611 |
if |
|
1611 | if base_opt: | |
1612 | ui.warn(_(b"ignoring --base because --exact was specified\n")) |
|
1612 | ui.warn(_(b"ignoring --base because --exact was specified\n")) | |
1613 | base = repo.revs(b'parents(%ld) - %ld', revs, revs) |
|
1613 | base = repo.revs(b'parents(%ld) - %ld', revs, revs) | |
1614 | if not base: |
|
1614 | if not base: | |
1615 | base = [nullrev] |
|
1615 | base = [nullrev] | |
|
1616 | elif base_opt: | |||
|
1617 | base = logcmdutil.revrange(repo, base_opt) | |||
|
1618 | if not base: | |||
|
1619 | # base specified, but nothing was selected | |||
|
1620 | base = [nullrev] | |||
1616 | else: |
|
1621 | else: | |
1617 | base = logcmdutil.revrange(repo, opts.get('base')) |
|
1622 | base = None | |
1618 | if cgversion not in changegroup.supportedoutgoingversions(repo): |
|
1623 | if cgversion not in changegroup.supportedoutgoingversions(repo): | |
1619 | raise error.Abort( |
|
1624 | raise error.Abort( | |
1620 | _(b"repository does not support bundle version %s") % cgversion |
|
1625 | _(b"repository does not support bundle version %s") % cgversion | |
1621 | ) |
|
1626 | ) | |
1622 |
|
1627 | |||
1623 | if base: |
|
1628 | if base is not None: | |
1624 | if dests: |
|
1629 | if dests: | |
1625 | raise error.InputError( |
|
1630 | raise error.InputError( | |
1626 | _(b"--base is incompatible with specifying destinations") |
|
1631 | _(b"--base is incompatible with specifying destinations") |
@@ -141,14 +141,9 b' should fail' | |||||
141 | ignoring --base because --all was specified |
|
141 | ignoring --base because --all was specified | |
142 | 9 changesets found |
|
142 | 9 changesets found | |
143 | $ hg -R test bundle --base 3-3 -r tip test-base-match-nothing-with-dest.hg --config paths.default=$TESTTMP/test-3 |
|
143 | $ hg -R test bundle --base 3-3 -r tip test-base-match-nothing-with-dest.hg --config paths.default=$TESTTMP/test-3 | |
144 | searching for changes (known-bad-output !) |
|
144 | 5 changesets found | |
145 | 1 changesets found (known-bad-output !) |
|
|||
146 | 5 changesets found (missing-correct-output !) |
|
|||
147 | $ hg -R test bundle --base 3-3 -r tip test-base-match-nothing-no-dest.hg |
|
145 | $ hg -R test bundle --base 3-3 -r tip test-base-match-nothing-no-dest.hg | |
148 | config error: default repository not configured! (known-bad-output !) |
|
146 | 5 changesets found | |
149 | (see 'hg help config.paths') (known-bad-output !) |
|
|||
150 | 5 changesets found (missing-correct-output !) |
|
|||
151 | [30] |
|
|||
152 | $ hg -R test bundle --base 3 -r tip test-bundle-should-fail.hg |
|
147 | $ hg -R test bundle --base 3 -r tip test-bundle-should-fail.hg | |
153 | 1 changesets found |
|
148 | 1 changesets found | |
154 |
|
149 |
General Comments 0
You need to be logged in to leave comments.
Login now