mercurial/commands.py
changeset 37164 b229fd9adeae
parent 37152 0348c778bf70
child 37165 6c7a6b04b274
--- a/mercurial/commands.py	Fri Mar 23 20:43:55 2018 +0900
+++ b/mercurial/commands.py	Fri Mar 30 12:43:08 2018 +0200
@@ -1199,12 +1199,12 @@
 
     bundletype = opts.get('type', 'bzip2').lower()
     try:
-        bcompression, cgversion, params = exchange.parsebundlespec(
-                repo, bundletype, strict=False)
+        bundlespec = exchange.parsebundlespec(repo, bundletype, strict=False)
     except error.UnsupportedBundleSpecification as e:
         raise error.Abort(pycompat.bytestr(e),
                           hint=_("see 'hg help bundlespec' for supported "
                                  "values for --type"))
+    cgversion = bundlespec.version
 
     # Packed bundles are a pseudo bundle format for now.
     if cgversion == 's1':
@@ -1246,6 +1246,7 @@
         scmutil.nochangesfound(ui, repo, not base and outgoing.excluded)
         return 1
 
+    bcompression = bundlespec.compression
     if cgversion == '01': #bundle1
         if bcompression is None:
             bcompression = 'UN'