Patchwork [3,of,7] py3: convert opts to bytes in cmdutil.dorecord()

login
register
mail settings
Submitter Pulkit Goyal
Date May 4, 2017, 3:16 a.m.
Message ID <c8d28b86f3ccb0c06bac.1493867805@pulkit-goyal>
Download mbox | patch
Permalink /patch/20416/
State Accepted
Headers show

Comments

Pulkit Goyal - May 4, 2017, 3:16 a.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1492721446 -19800
#      Fri Apr 21 02:20:46 2017 +0530
# Node ID c8d28b86f3ccb0c06bac98ede55d7296e205e687
# Parent  e63c8efd338521249863af0942e4c8166dd90fc5
py3: convert opts to bytes in cmdutil.dorecord()

commands.commit() calls cmdutil.dorecord() where opts are passed as unicodes
being keyword arguments. This patch converts them back to bytes as they are
required.

Patch

diff -r e63c8efd3385 -r c8d28b86f3cc mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Fri Apr 28 00:49:30 2017 +0530
+++ b/mercurial/cmdutil.py	Fri Apr 21 02:20:46 2017 +0530
@@ -115,6 +115,7 @@ 
 def dorecord(ui, repo, commitfunc, cmdsuggest, backupall,
             filterfn, *pats, **opts):
     from . import merge as mergemod
+    opts = pycompat.byteskwargs(opts)
     if not ui.interactive():
         if cmdsuggest:
             msg = _('running non-interactively, use %s instead') % cmdsuggest