##// END OF EJS Templates
stream-clone: make sure the `stream` capability is set when bundling...
marmoute -
r51411:f2bcb56a default
parent child Browse files
Show More
@@ -1730,6 +1730,8 b' def writenewbundle('
1730 caps = {}
1730 caps = {}
1731 if opts.get(b'obsolescence', False):
1731 if opts.get(b'obsolescence', False):
1732 caps[b'obsmarkers'] = (b'V1',)
1732 caps[b'obsmarkers'] = (b'V1',)
1733 if opts.get(b'streamv2'):
1734 caps[b'stream'] = [b'v2']
1733 bundle = bundle20(ui, caps)
1735 bundle = bundle20(ui, caps)
1734 bundle.setcompression(compression, compopts)
1736 bundle.setcompression(compression, compopts)
1735 _addpartsfromopts(ui, repo, bundle, source, outgoing, opts)
1737 _addpartsfromopts(ui, repo, bundle, source, outgoing, opts)
@@ -269,17 +269,15 b' def parsebundlespec(repo, spec, strict=T'
269 )
269 )
270
270
271 # Compute contentopts based on the version
271 # Compute contentopts based on the version
272 if b"stream" in params and params[b"stream"] == b"v2":
272 if b"stream" in params:
273 # That case is fishy as this mostly derails the version selection
273 # This case is fishy as this mostly derails the version selection
274 # mechanism. `stream` bundles are quite specific and used differently
274 # mechanism. `stream` bundles are quite specific and used differently
275 # as "normal" bundles.
275 # as "normal" bundles.
276 #
276 #
277 # So we are pinning this to "v2", as this will likely be
278 # compatible forever. (see the next conditional).
279 #
280 # (we should probably define a cleaner way to do this and raise a
277 # (we should probably define a cleaner way to do this and raise a
281 # warning when the old way is encounter)
278 # warning when the old way is encountered)
282 version = b"streamv2"
279 if params[b"stream"] == b"v2":
280 version = b"streamv2"
283 contentopts = _bundlespeccontentopts.get(version, {}).copy()
281 contentopts = _bundlespeccontentopts.get(version, {}).copy()
284 if version == b"streamv2":
282 if version == b"streamv2":
285 # streamv2 have been reported as "v2" for a while.
283 # streamv2 have been reported as "v2" for a while.
General Comments 0
You need to be logged in to leave comments. Login now