Mercurial > hg
changeset 51573:4a9d0898bf16
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 09 Apr 2024 14:36:01 +0200 |
parents | 8e8776a28683 |
children | 9b51a4fb0f96 |
files | mercurial/bundlecaches.py tests/test-stream-bundle-v2.t |
diffstat | 2 files changed, 19 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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, },
--- 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