mercurial/exchange.py
branchstable
changeset 30890 10c0ee338535
parent 30889 ffed3bf5cd4c
child 31490 291951ad070b
--- a/mercurial/exchange.py	Thu Mar 16 12:23:56 2017 -0700
+++ b/mercurial/exchange.py	Thu Mar 16 12:33:15 2017 -0700
@@ -130,8 +130,12 @@
         if spec in util.compengines.supportedbundlenames:
             compression = spec
             version = 'v1'
+            # Generaldelta repos require v2.
             if 'generaldelta' in repo.requirements:
                 version = 'v2'
+            # Modern compression engines require v2.
+            if compression not in _bundlespecv1compengines:
+                version = 'v2'
         elif spec in _bundlespeccgversions:
             if spec == 'packed1':
                 compression = 'none'