Patchwork [03,of,10] py3: convert kwargs' keys to str before passing in cmdutil.getcommiteditor

login
register
mail settings
Submitter Pulkit Goyal
Date May 6, 2017, 3:01 a.m.
Message ID <6b6133f042eff0ca5261.1494039675@pulkit-goyal>
Download mbox | patch
Permalink /patch/20471/
State Accepted
Headers show

Comments

Pulkit Goyal - May 6, 2017, 3:01 a.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1493939505 -19800
#      Fri May 05 04:41:45 2017 +0530
# Node ID 6b6133f042eff0ca52612a58e8b071dffdfb7347
# Parent  2ed3b0dfc16ab5eb77fd95d4b09d312d43d76b4b
py3: convert kwargs' keys to str before passing in cmdutil.getcommiteditor

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -706,7 +706,8 @@ 
 
     def commitfunc(ui, repo, message, match, opts):
         editform = 'backout'
-        e = cmdutil.getcommiteditor(editform=editform, **opts)
+        e = cmdutil.getcommiteditor(editform=editform,
+                        **pycompat.strkwargs(opts))
         if not message:
             # we don't translate commit messages
             message = "Backed out changeset %s" % short(node)
@@ -2240,7 +2241,8 @@ 
     if not opts.get('date') and opts.get('currentdate'):
         opts['date'] = "%d %d" % util.makedate()
 
-    editor = cmdutil.getcommiteditor(editform='graft', **opts)
+    editor = cmdutil.getcommiteditor(editform='graft',
+                    **pycompat.strkwargs(opts))
 
     cont = False
     if opts.get('continue'):
@@ -5216,7 +5218,8 @@ 
             editform = 'tag.remove'
         else:
             editform = 'tag.add'
-        editor = cmdutil.getcommiteditor(editform=editform, **opts)
+        editor = cmdutil.getcommiteditor(editform=editform,
+                        **pycompat.strkwargs(opts))
 
         # don't allow tagging the null rev
         if (not opts.get('remove') and