Patchwork [4,of,7] py3: use pycompat.strkwargs() to convert kwargs keys to str before passing

login
register
mail settings
Submitter Pulkit Goyal
Date June 17, 2017, 12:45 p.m.
Message ID <e95901baf03f983af816.1497703522@workspace>
Download mbox | patch
Permalink /patch/21457/
State Accepted
Headers show

Comments

Pulkit Goyal - June 17, 2017, 12:45 p.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1497692111 -19800
#      Sat Jun 17 15:05:11 2017 +0530
# Node ID e95901baf03f983af8163a1d848233b29629d97b
# Parent  8672832a62a28fec052f23120e6b801da5cb7081
py3: use pycompat.strkwargs() to convert kwargs keys to str before passing

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -25,6 +25,7 @@ 
     obsolete,
     phases,
     pushkey,
+    pycompat,
     scmutil,
     sslutil,
     streamclone,
@@ -1386,7 +1387,7 @@ 
             kwargs['obsmarkers'] = True
             pullop.stepsdone.add('obsmarkers')
     _pullbundle2extraprepare(pullop, kwargs)
-    bundle = pullop.remote.getbundle('pull', **kwargs)
+    bundle = pullop.remote.getbundle('pull', **pycompat.strkwargs(kwargs))
     try:
         op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
     except bundle2.AbortFromPart as exc:
diff --git a/mercurial/formatter.py b/mercurial/formatter.py
--- a/mercurial/formatter.py
+++ b/mercurial/formatter.py
@@ -371,6 +371,7 @@ 
             props['templ'] = self._t
             props['repo'] = props['ctx'].repo()
             props['revcache'] = {}
+        props = pycompat.strkwargs(props)
         g = self._t(self._tref, ui=self._ui, cache=self._cache, **props)
         self._out.write(templater.stringify(g))