mercurial/bundlecaches.py
changeset 46627 f4c325bf80fc
parent 45785 80f32ec8653a
child 47342 dc3800569157
equal deleted inserted replaced
46626:ee91966aec0f 46627:f4c325bf80fc
     7 
     7 
     8 from .thirdparty import attr
     8 from .thirdparty import attr
     9 
     9 
    10 from . import (
    10 from . import (
    11     error,
    11     error,
       
    12     requirements as requirementsmod,
    12     sslutil,
    13     sslutil,
    13     util,
    14     util,
    14 )
    15 )
    15 from .utils import stringutil
    16 from .utils import stringutil
    16 
    17 
   162 
   163 
   163         if spec in util.compengines.supportedbundlenames:
   164         if spec in util.compengines.supportedbundlenames:
   164             compression = spec
   165             compression = spec
   165             version = b'v1'
   166             version = b'v1'
   166             # Generaldelta repos require v2.
   167             # Generaldelta repos require v2.
   167             if b'generaldelta' in repo.requirements:
   168             if requirementsmod.GENERALDELTA_REQUIREMENT in repo.requirements:
   168                 version = b'v2'
   169                 version = b'v2'
   169             # Modern compression engines require v2.
   170             # Modern compression engines require v2.
   170             if compression not in _bundlespecv1compengines:
   171             if compression not in _bundlespecv1compengines:
   171                 version = b'v2'
   172                 version = b'v2'
   172         elif spec in _bundlespeccgversions:
   173         elif spec in _bundlespeccgversions: