Mercurial > hg
changeset 21988:12cd3827b860
wireproto: add a ``boolean`` type for getbundle parameters
This will be used to control inclusion of some parts in a bundle2.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 22 May 2014 17:20:52 -0700 |
parents | 4953cd193e84 |
children | bdb6d97f0a04 |
files | mercurial/wireproto.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/wireproto.py Sun Aug 03 19:19:23 2014 +0900 +++ b/mercurial/wireproto.py Thu May 22 17:20:52 2014 -0700 @@ -349,6 +349,8 @@ value = encodelist(value) elif keytype == 'csv': value = ','.join(value) + elif keytype == 'boolean': + value = bool(value) elif keytype != 'plain': raise KeyError('unknown getbundle option type %s' % keytype) @@ -652,6 +654,8 @@ opts[k] = decodelist(v) elif keytype == 'csv': opts[k] = set(v.split(',')) + elif keytype == 'boolean': + opts[k] = '%i' % bool(v) elif keytype != 'plain': raise KeyError('unknown getbundle option type %s' % keytype)