changeset 22351:7e6dd496d327

wireprotocol: fix 'boolean' handling The encoding and decoding code were swapped. This is now fixed.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 29 Aug 2014 12:51:00 +0200
parents 6d113cc7a31a
children dc371d1f0de1
files mercurial/wireproto.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Wed Aug 20 01:15:09 2014 -0700
+++ b/mercurial/wireproto.py	Fri Aug 29 12:51:00 2014 +0200
@@ -351,7 +351,7 @@
             elif keytype == 'csv':
                 value = ','.join(value)
             elif keytype == 'boolean':
-                value = bool(value)
+                value = '%i' % bool(value)
             elif keytype != 'plain':
                 raise KeyError('unknown getbundle option type %s'
                                % keytype)
@@ -656,7 +656,7 @@
         elif keytype == 'csv':
             opts[k] = set(v.split(','))
         elif keytype == 'boolean':
-            opts[k] = '%i' % bool(v)
+            opts[k] = bool(v)
         elif keytype != 'plain':
             raise KeyError('unknown getbundle option type %s'
                            % keytype)