Patchwork D1647: py3: handle keyword arguments correctly in wireproto.py

login
register
mail settings
Submitter phabricator
Date Dec. 10, 2017, 2:51 a.m.
Message ID <7f4a84cd97ded08f88778c7b0752da1d@localhost.localdomain>
Download mbox | patch
Permalink /patch/26190/
State Not Applicable
Headers show

Comments

phabricator - Dec. 10, 2017, 2:51 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7d2292416046: py3: handle keyword arguments correctly in wireproto.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1647?vs=4326&id=4338

REVISION DETAIL
  https://phab.mercurial-scm.org/D1647

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -452,9 +452,9 @@ 
         # don't pass optional arguments left at their default value
         opts = {}
         if three is not None:
-            opts['three'] = three
+            opts[r'three'] = three
         if four is not None:
-            opts['four'] = four
+            opts[r'four'] = four
         return self._call('debugwireargs', one=one, two=two, **opts)
 
     def _call(self, cmd, **args):
@@ -817,7 +817,7 @@ 
 def debugwireargs(repo, proto, one, two, others):
     # only accept optional args from the known set
     opts = options('debugwireargs', ['three', 'four'], others)
-    return repo.debugwireargs(one, two, **opts)
+    return repo.debugwireargs(one, two, **pycompat.strkwargs(opts))
 
 @wireprotocommand('getbundle', '*')
 def getbundle(repo, proto, others):