mercurial/commands.py
changeset 31831 1da9b2a4cbb8
parent 31826 9fce17c4a7b3
child 31845 86246530b8d2
--- a/mercurial/commands.py	Wed Apr 05 23:44:22 2017 -0400
+++ b/mercurial/commands.py	Thu Apr 06 17:01:58 2017 -0700
@@ -1377,9 +1377,11 @@
             bcompression = 'UN'
         bversion = 'HG10' + bcompression
         bcompression = None
+    elif cgversion in ('02', '03'):
+        bversion = 'HG20'
     else:
-        assert cgversion == '02'
-        bversion = 'HG20'
+        raise error.ProgrammingError(
+            'bundle: unexpected changegroup version %s' % cgversion)
 
     # TODO compression options should be derived from bundlespec parsing.
     # This is a temporary hack to allow adjusting bundle compression