From patchwork Thu May 4 03:16:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3,of,7] py3: convert opts to bytes in cmdutil.dorecord() From: Pulkit Goyal <7895pulkit@gmail.com> X-Patchwork-Id: 20416 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Thu, 04 May 2017 08:46:45 +0530 # 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. 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