Mercurial > public > mercurial-scm > hg-stable
diff mercurial/bundlecaches.py @ 51596:c4aab3661f25
bundlespec: rationalize the way we specify stream bundle version
Instead of having weird dedicated option for each version (v2, v3, etc) we
reuse the same "stream" parameters. This is consistent with the ability to
request a stream clone using "none-v2;stream=v2".
This changeset introduce no user visible change, this is pure internal cleaning.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 02 Apr 2024 21:53:17 +0200 |
parents | 0913a49e020c |
children | 4a9d0898bf16 |
line wrap: on
line diff
--- a/mercurial/bundlecaches.py Tue Apr 02 17:02:39 2024 +0200 +++ b/mercurial/bundlecaches.py Tue Apr 02 21:53:17 2024 +0200 @@ -136,7 +136,7 @@ b'cg.version': b'02', b'obsolescence': False, b'phases': False, - b"streamv2": True, + b"stream": "v2", b'tagsfnodescache': False, b'revbranchcache': False, }, @@ -145,7 +145,7 @@ b'cg.version': b'03', b'obsolescence': False, b'phases': False, - b"streamv3-exp": True, + b"stream": "v3-exp", b'tagsfnodescache': False, b'revbranchcache': False, }, @@ -388,10 +388,7 @@ if ( bundlespec.wirecompression == b'UN' and bundlespec.wireversion == b'02' - and ( - bundlespec.contentopts.get(b'streamv2') - or bundlespec.contentopts.get(b'streamv3-exp') - ) + and bundlespec.contentopts.get(b'stream', None) in (b"v2", b"v3-exp") ): return True