changeset 33102:1b6946f87c50

py3: use pycompat.strkwargs() to convert kwargs keys to str
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 27 Jun 2017 00:23:32 +0530
parents b257aaa0743a
children db8531c45953
files mercurial/cmdutil.py mercurial/debugcommands.py mercurial/mdiff.py
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)