Mercurial > public > mercurial-scm > hg
diff mercurial/bundlecaches.py @ 53042:cdd7bf612c7b stable tip
bundle-spec: properly format boolean parameter (issue6960)
This was breaking automatic clone bundle generation. This changeset fixes it and
add a test to catch it in the future.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 11 Mar 2025 02:29:42 +0100 |
parents | e705fec4a03f |
children |
line wrap: on
line diff
--- a/mercurial/bundlecaches.py Tue Mar 11 10:37:39 2025 +0100 +++ b/mercurial/bundlecaches.py Tue Mar 11 02:29:42 2025 +0100 @@ -102,8 +102,12 @@ def as_spec(self): parts = [b"%s-%s" % (self.compression, self.version)] - for param in sorted(self._explicit_params.items()): - parts.append(b'%s=%s' % param) + for param, raw_value in sorted(self._explicit_params.items()): + if isinstance(raw_value, bool): + value = b"yes" if raw_value else b"no" + else: + value = raw_value + parts.append(b'%s=%s' % (param, value)) return b';'.join(parts)