bundle: warn for --base with --all
authortimeless <timeless@mozdev.org>
Thu, 17 Dec 2015 15:05:25 +0000
changeset 27423 c953e26f3734
parent 27422 67eeb7421d8d
child 27424 c2854c41f9ac
bundle: warn for --base with --all
mercurial/commands.py
tests/test-bundle-r.t
--- a/mercurial/commands.py	Thu Dec 17 15:03:45 2015 +0000
+++ b/mercurial/commands.py	Thu Dec 17 15:05:25 2015 +0000
@@ -1347,6 +1347,8 @@
         if dest:
             raise error.Abort(_("--all is incompatible with specifying "
                                 "a destination"))
+        if opts.get('base'):
+            ui.warn(_("ignoring --base because --all was specified\n"))
         base = ['null']
     else:
         base = scmutil.revrange(repo, opts.get('base'))
--- a/tests/test-bundle-r.t	Thu Dec 17 15:03:45 2015 +0000
+++ b/tests/test-bundle-r.t	Thu Dec 17 15:05:25 2015 +0000
@@ -174,6 +174,9 @@
   4 changesets found
   $ hg -R test bundle --base 2 test-bundle-all.hg
   6 changesets found
+  $ hg -R test bundle --base 2 --all test-bundle-all-2.hg
+  ignoring --base because --all was specified
+  9 changesets found
   $ hg -R test bundle --base 3 -r tip test-bundle-should-fail.hg
   1 changesets found