comparison mercurial/bundle2.py @ 50552:f2bcb56a1d39

stream-clone: make sure the `stream` capability is set when bundling This is important to start narrowing protocol option in the next changesets.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 21 May 2023 01:03:19 +0200
parents cd2a2963b982
children 3c0da0fa0eed
comparison
equal deleted inserted replaced
50551:cd2a2963b982 50552:f2bcb56a1d39
1728 raise error.ProgrammingError(msg) 1728 raise error.ProgrammingError(msg)
1729 1729
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)
1736 chunkiter = bundle.getchunks() 1738 chunkiter = bundle.getchunks()
1737 1739