py3: use pycompat.strkwargs() to convert kwargs keys to str
authorPulkit Goyal <7895pulkit@gmail.com>
Tue, 27 Jun 2017 00:23:32 +0530
changeset 33102 1b6946f87c50
parent 33101 b257aaa0743a
child 33103 db8531c45953
py3: use pycompat.strkwargs() to convert kwargs keys to str
mercurial/cmdutil.py
mercurial/debugcommands.py
mercurial/mdiff.py
--- a/mercurial/cmdutil.py	Tue Jun 27 00:15:56 2017 +0530
+++ b/mercurial/cmdutil.py	Tue Jun 27 00:23:32 2017 +0530
@@ -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()
--- a/mercurial/debugcommands.py	Tue Jun 27 00:15:56 2017 +0530
+++ b/mercurial/debugcommands.py	Tue Jun 27 00:23:32 2017 +0530
@@ -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', [])
--- a/mercurial/mdiff.py	Tue Jun 27 00:15:56 2017 +0530
+++ b/mercurial/mdiff.py	Tue Jun 27 00:23:32 2017 +0530
@@ -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)