mercurial/commands.py
changeset 26640 b13fdcc4e700
parent 26639 92d67e5729b9
child 26641 5c57d01fe64e
--- a/mercurial/commands.py	Tue Oct 13 11:43:21 2015 -0700
+++ b/mercurial/commands.py	Tue Oct 13 10:57:54 2015 -0700
@@ -1242,7 +1242,13 @@
         revs = scmutil.revrange(repo, opts['rev'])
 
     bundletype = opts.get('type', 'bzip2').lower()
-    cgversion, bcompression = exchange.parsebundlespec(repo, bundletype)
+    try:
+        bcompression, cgversion = exchange.parsebundlespec(
+                repo, bundletype, strict=False)
+    except error.UnsupportedBundleSpecification as e:
+        raise error.Abort(str(e),
+                          hint=_('see "hg help bundle" for supported '
+                                 'values for --type'))
 
     if opts.get('all'):
         base = ['null']