changeset 32897:799db2af824c

py3: convert keys of kwargs back to bytes using pycompat.byteskwargs()
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 17 Jun 2017 15:29:26 +0530
parents e14484e7f562
children c425b678df7c
files hgext/strip.py mercurial/formatter.py mercurial/hook.py
diffstat 3 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/strip.py	Sat Jun 17 15:05:11 2017 +0530
+++ b/hgext/strip.py	Sat Jun 17 15:29:26 2017 +0530
@@ -14,6 +14,7 @@
     lock as lockmod,
     merge,
     node as nodemod,
+    pycompat,
     registrar,
     repair,
     scmutil,
@@ -133,6 +134,7 @@
 
     Return 0 on success.
     """
+    opts = pycompat.byteskwargs(opts)
     backup = True
     if opts.get('no_backup') or opts.get('nobackup'):
         backup = False
--- a/mercurial/formatter.py	Sat Jun 17 15:05:11 2017 +0530
+++ b/mercurial/formatter.py	Sat Jun 17 15:29:26 2017 +0530
@@ -354,6 +354,7 @@
         self._cache = {}  # for templatekw/funcs to store reusable data
     def context(self, **ctxs):
         '''insert context objects to be used to render template keywords'''
+        ctxs = pycompat.byteskwargs(ctxs)
         assert all(k == 'ctx' for k in ctxs)
         self._item.update(ctxs)
     def _showitem(self):
--- a/mercurial/hook.py	Sat Jun 17 15:05:11 2017 +0530
+++ b/mercurial/hook.py	Sat Jun 17 15:29:26 2017 +0530
@@ -205,6 +205,7 @@
     return r
 
 def runhooks(ui, repo, htype, hooks, throw=False, **args):
+    args = pycompat.byteskwargs(args)
     res = {}
     oldstdout = -1