diff -r cc44b3df9bb4 -r c4aab3661f25 mercurial/bundle2.py --- a/mercurial/bundle2.py Tue Apr 02 17:02:39 2024 +0200 +++ b/mercurial/bundle2.py Tue Apr 02 21:53:17 2024 +0200 @@ -1728,9 +1728,10 @@ caps = {} if opts.get(b'obsolescence', False): caps[b'obsmarkers'] = (b'V1',) - if opts.get(b'streamv2'): + stream_version = opts.get(b'stream', b"") + if stream_version == b"v2": caps[b'stream'] = [b'v2'] - elif opts.get(b'streamv3-exp'): + elif stream_version == b"v3-exp": caps[b'stream'] = [b'v3-exp'] bundle = bundle20(ui, caps) bundle.setcompression(compression, compopts) @@ -1774,10 +1775,10 @@ if repository.REPO_FEATURE_SIDE_DATA in repo.features: part.addparam(b'exp-sidedata', b'1') - if opts.get(b'streamv2', False): + if opts.get(b'stream', b"") == b"v2": addpartbundlestream2(bundler, repo, stream=True) - if opts.get(b'streamv3-exp', False): + if opts.get(b'stream', b"") == b"v3-exp": addpartbundlestream2(bundler, repo, stream=True) if opts.get(b'tagsfnodescache', True):