Patchwork [3,of,4] bundle: fix error for --all with destination

login
register
mail settings
Submitter timeless@mozdev.org
Date Dec. 17, 2015, 3:13 p.m.
Message ID <52f06746feaaafa311aa.1450365217@waste.org>
Download mbox | patch
Permalink /patch/12103/
State Accepted
Headers show

Comments

timeless@mozdev.org - Dec. 17, 2015, 3:13 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1450364625 0
#      Thu Dec 17 15:03:45 2015 +0000
# Node ID 52f06746feaaafa311aa4dca1495aba5ea1406a2
# Parent  44def80a945bf4cdf6987d9043479b4d3a923813
bundle: fix error for --all with destination

Before it complained about --base

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1344,6 +1344,9 @@ 
                           hint=_('use "hg debugcreatestreamclonebundle"'))
 
     if opts.get('all'):
+        if dest:
+            raise error.Abort(_("--all is incompatible with specifying "
+                                "a destination"))
         base = ['null']
     else:
         base = scmutil.revrange(repo, opts.get('base'))
diff --git a/tests/test-bundle-r.t b/tests/test-bundle-r.t
--- a/tests/test-bundle-r.t
+++ b/tests/test-bundle-r.t
@@ -161,6 +161,9 @@ 
   $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg test-3
   abort: --base is incompatible with specifying a destination
   [255]
+  $ hg -R test bundle -a -r tip test-bundle-branch1.hg test-3
+  abort: --all is incompatible with specifying a destination
+  [255]
   $ hg -R test bundle -r tip test-bundle-branch1.hg
   abort: repository default-push not found!
   [255]