mercurial/commands.py
changeset 26510 77c13f3c01ca
parent 26501 0748083f2898
child 26531 15ce78517d4b
--- a/mercurial/commands.py	Thu Oct 01 19:14:47 2015 -0700
+++ b/mercurial/commands.py	Thu Oct 01 18:01:24 2015 -0700
@@ -1238,13 +1238,7 @@
         revs = scmutil.revrange(repo, opts['rev'])
 
     bundletype = opts.get('type', 'bzip2').lower()
-    btypes = {'none': 'HG10UN',
-              'bzip2': 'HG10BZ',
-              'gzip': 'HG10GZ',
-              'bundle2': 'HG20'}
-    bundletype = btypes.get(bundletype)
-    if bundletype not in changegroup.bundletypes:
-        raise util.Abort(_('unknown bundle type specified with --type'))
+    bundletype = cmdutil.parsebundletype(bundletype)
 
     if opts.get('all'):
         base = ['null']