wireproto: add a ``boolean`` type for getbundle parameters
This will be used to control inclusion of some parts in a bundle2.
--- 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)