[PATCH 3 of 8] py3: use pycompat.strkwargs() to convert kwargs keys to str

Pulkit Goyal 7895pulkit at gmail.com
Mon Jun 26 15:55:24 EDT 2017


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1498503212 -19800
#      Tue Jun 27 00:23:32 2017 +0530
# Node ID 34b6d0746a92388e10751b8bff90a7b7bb22b1f4
# Parent  bd2b8d7fb25b256e1e9fa03d43a7fb6712d3daa3
py3: use pycompat.strkwargs() to convert kwargs keys to str

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2839,7 +2839,8 @@
                 user = opts.get('user') or old.user()
                 date = opts.get('date') or old.date()
             editform = mergeeditform(old, 'commit.amend')
-            editor = getcommiteditor(editform=editform, **opts)
+            editor = getcommiteditor(editform=editform,
+                                            **pycompat.strkwargs(opts))
             if not message:
                 editor = getcommiteditor(edit=True, editform=editform)
                 message = old.description()
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -2165,7 +2165,7 @@
     else:
         displayer = cmdutil.makelogtemplater(ui, repo, tmpl)
         for r in revs:
-            displayer.show(repo[r], **props)
+            displayer.show(repo[r], **pycompat.strkwargs(props))
         displayer.close()
 
 @command('debugupdatecaches', [])
diff --git a/mercurial/mdiff.py b/mercurial/mdiff.py
--- a/mercurial/mdiff.py
+++ b/mercurial/mdiff.py
@@ -84,6 +84,7 @@
 
     def copy(self, **kwargs):
         opts = dict((k, getattr(self, k)) for k in self.defaults)
+        opts = pycompat.strkwargs(opts)
         opts.update(kwargs)
         return diffopts(**opts)
 


More information about the Mercurial-devel mailing list