wireprotocol: fix 'boolean' handling
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 29 Aug 2014 12:51:00 +0200
changeset 22351 7e6dd496d327
parent 22350 6d113cc7a31a
child 22352 dc371d1f0de1
wireprotocol: fix 'boolean' handling The encoding and decoding code were swapped. This is now fixed.
mercurial/wireproto.py
--- 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)