mercurial/bundlecaches.py
changeset 50533 f4a540c203d7
parent 50518 f2bcb56a1d39
child 50544 e6948aafda6f
equal deleted inserted replaced
50532:116da6bb7e3b 50533:f4a540c203d7
    95         b'changegroup': False,
    95         b'changegroup': False,
    96         b'cg.version': b'02',
    96         b'cg.version': b'02',
    97         b'obsolescence': False,
    97         b'obsolescence': False,
    98         b'phases': False,
    98         b'phases': False,
    99         b"streamv2": True,
    99         b"streamv2": True,
       
   100         b'tagsfnodescache': False,
       
   101         b'revbranchcache': False,
       
   102     },
       
   103     b'streamv3-exp': {
       
   104         b'changegroup': False,
       
   105         b'cg.version': b'03',
       
   106         b'obsolescence': False,
       
   107         b'phases': False,
       
   108         b"streamv3-exp": True,
   100         b'tagsfnodescache': False,
   109         b'tagsfnodescache': False,
   101         b'revbranchcache': False,
   110         b'revbranchcache': False,
   102     },
   111     },
   103     b'packed1': {
   112     b'packed1': {
   104         b'cg.version': b's1',
   113         b'cg.version': b's1',
   276         #
   285         #
   277         # (we should probably define a cleaner way to do this and raise a
   286         # (we should probably define a cleaner way to do this and raise a
   278         # warning when the old way is encountered)
   287         # warning when the old way is encountered)
   279         if params[b"stream"] == b"v2":
   288         if params[b"stream"] == b"v2":
   280             version = b"streamv2"
   289             version = b"streamv2"
       
   290         if params[b"stream"] == b"v3-exp":
       
   291             version = b"streamv3-exp"
   281     contentopts = _bundlespeccontentopts.get(version, {}).copy()
   292     contentopts = _bundlespeccontentopts.get(version, {}).copy()
   282     if version == b"streamv2":
   293     if version == b"streamv2" or version == b"streamv3-exp":
   283         # streamv2 have been reported as "v2" for a while.
   294         # streamv2 have been reported as "v2" for a while.
   284         version = b"v2"
   295         version = b"v2"
   285 
   296 
   286     engine = util.compengines.forbundlename(compression)
   297     engine = util.compengines.forbundlename(compression)
   287     compression, wirecompression = engine.bundletype()
   298     compression, wirecompression = engine.bundletype()
   335 
   346 
   336     # Stream clone v2
   347     # Stream clone v2
   337     if (
   348     if (
   338         bundlespec.wirecompression == b'UN'
   349         bundlespec.wirecompression == b'UN'
   339         and bundlespec.wireversion == b'02'
   350         and bundlespec.wireversion == b'02'
   340         and bundlespec.contentopts.get(b'streamv2')
   351         and (
       
   352             bundlespec.contentopts.get(b'streamv2')
       
   353             or bundlespec.contentopts.get(b'streamv3-exp')
       
   354         )
   341     ):
   355     ):
   342         return True
   356         return True
   343 
   357 
   344     return False
   358     return False
   345 
   359