Mercurial > public > mercurial-scm > hg-stable
diff mercurial/exchange.py @ 50567:f4a540c203d7
stream-clone: support streamv3 on the cli [hg bundle]
We add support and test for this. The support is still experimental, so the
various name and identifier will eventually need to be renamed when stream-v3
gets out of experimental.
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Tue, 23 May 2023 01:39:47 +0200 |
parents | b361e9da3c3b |
children | 60f9602b413e |
line wrap: on
line diff
--- a/mercurial/exchange.py Tue May 23 01:28:56 2023 +0200 +++ b/mercurial/exchange.py Tue May 23 01:39:47 2023 +0200 @@ -146,6 +146,12 @@ splitted = requirements.split() params = bundle2._formatrequirementsparams(splitted) return b'none-v2;stream=v2;%s' % params + elif part.type == b'stream3-exp' and version is None: + # A stream3 part requires to be part of a v2 bundle + requirements = urlreq.unquote(part.params[b'requirements']) + splitted = requirements.split() + params = bundle2._formatrequirementsparams(splitted) + return b'none-v2;stream=v3-exp;%s' % params elif part.type == b'obsmarkers': params[b'obsolescence'] = b'yes' if not part.mandatory: