# HG changeset patch # User Pierre-Yves David # Date 1712666161 -7200 # Node ID 4a9d0898bf16adecf52b56db9aae40c98458d8fc # Parent 8e8776a28683ceeac2e6f0da1a0116bc0591003b bundlespec: fix the "streamv2" and "streamv3-exp" variant In c4aab3661f25, we broken this feature by adding unicode instead of bytes to the dictionary. On the other hand, this feature was never tested, so augment the tests to tests this. diff -r 8e8776a28683 -r 4a9d0898bf16 mercurial/bundlecaches.py --- a/mercurial/bundlecaches.py Wed Apr 03 15:33:25 2024 +0200 +++ b/mercurial/bundlecaches.py Tue Apr 09 14:36:01 2024 +0200 @@ -136,7 +136,7 @@ b'cg.version': b'02', b'obsolescence': False, b'phases': False, - b"stream": "v2", + b"stream": b"v2", b'tagsfnodescache': False, b'revbranchcache': False, }, @@ -145,7 +145,7 @@ b'cg.version': b'03', b'obsolescence': False, b'phases': False, - b"stream": "v3-exp", + b"stream": b"v3-exp", b'tagsfnodescache': False, b'revbranchcache': False, }, diff -r 8e8776a28683 -r 4a9d0898bf16 tests/test-stream-bundle-v2.t --- a/tests/test-stream-bundle-v2.t Wed Apr 03 15:33:25 2024 +0200 +++ b/tests/test-stream-bundle-v2.t Tue Apr 09 14:36:01 2024 +0200 @@ -74,6 +74,23 @@ none-v2;stream=v3-exp;requirements%3Dgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog (stream-v3 zstd no-rust !) none-v2;stream=v3-exp;requirements%3Dgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog (stream-v3 rust !) + $ hg bundle -a --type="none-$bundle_format" bundle.hg + $ hg debugbundle bundle.hg + Stream params: {} + stream2 -- {bytecount: 1693, filecount: 12, requirements: generaldelta%2Crevlogv1%2Csparserevlog} (mandatory: True) (stream-v2 no-zstd !) + stream2 -- {bytecount: 1693, filecount: 12, requirements: generaldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog} (mandatory: True) (stream-v2 zstd no-rust !) + stream2 -- {bytecount: 1819, filecount: 14, requirements: generaldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog} (mandatory: True) (stream-v2 rust !) + stream3-exp -- {requirements: generaldelta%2Crevlogv1%2Csparserevlog} (mandatory: True) (stream-v3 no-zstd !) + stream3-exp -- {requirements: generaldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog} (mandatory: True) (stream-v3 zstd no-rust !) + stream3-exp -- {requirements: generaldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog} (mandatory: True) (stream-v3 rust !) + $ hg debugbundle --spec bundle.hg + none-v2;stream=v2;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog (stream-v2 no-zstd !) + none-v2;stream=v2;requirements%3Dgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog (stream-v2 zstd no-rust !) + none-v2;stream=v2;requirements%3Dgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog (stream-v2 rust !) + none-v2;stream=v3-exp;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog (stream-v3 no-zstd !) + none-v2;stream=v3-exp;requirements%3Dgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog (stream-v3 zstd no-rust !) + none-v2;stream=v3-exp;requirements%3Dgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog (stream-v3 rust !) + Test that we can apply the bundle as a stream clone bundle $ cat > .hg/clonebundles.manifest << EOF