changeset 34739:b880cc11da5d

wireproto: bounce kwargs to/from bytes/str as needed Differential Revision: https://phab.mercurial-scm.org/D1107
author Augie Fackler <augie@google.com>
date Sun, 15 Oct 2017 00:05:43 -0400
parents 1c9128b735cd
children b2601c5977a4
files mercurial/wireproto.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Mon Oct 16 15:12:50 2017 +0200
+++ b/mercurial/wireproto.py	Sun Oct 15 00:05:43 2017 -0400
@@ -313,6 +313,7 @@
         return self._callstream('stream_out')
 
     def getbundle(self, source, **kwargs):
+        kwargs = pycompat.byteskwargs(kwargs)
         self.requirecap('getbundle', _('look up remote changes'))
         opts = {}
         bundlecaps = kwargs.get('bundlecaps')
@@ -337,7 +338,7 @@
                 raise KeyError('unknown getbundle option type %s'
                                % keytype)
             opts[key] = value
-        f = self._callcompressable("getbundle", **opts)
+        f = self._callcompressable("getbundle", **pycompat.strkwargs(opts))
         if any((cap.startswith('HG2') for cap in bundlecaps)):
             return bundle2.getunbundler(self.ui, f)
         else:
@@ -444,7 +445,7 @@
         yield unescapearg(''.join(work))
 
     def _submitone(self, op, args):
-        return self._call(op, **args)
+        return self._call(op, **pycompat.strkwargs(args))
 
     def debugwireargs(self, one, two, three=None, four=None, five=None):
         # don't pass optional arguments left at their default value