##// END OF EJS Templates
py3: convert keys of kwargs back to bytes using pycompat.byteskwargs()
Pulkit Goyal -
r32897:799db2af default
parent child Browse files
Show More
@@ -14,6 +14,7 from mercurial import (
14 lock as lockmod,
14 lock as lockmod,
15 merge,
15 merge,
16 node as nodemod,
16 node as nodemod,
17 pycompat,
17 registrar,
18 registrar,
18 repair,
19 repair,
19 scmutil,
20 scmutil,
@@ -133,6 +134,7 def stripcmd(ui, repo, *revs, **opts):
133
134
134 Return 0 on success.
135 Return 0 on success.
135 """
136 """
137 opts = pycompat.byteskwargs(opts)
136 backup = True
138 backup = True
137 if opts.get('no_backup') or opts.get('nobackup'):
139 if opts.get('no_backup') or opts.get('nobackup'):
138 backup = False
140 backup = False
@@ -354,6 +354,7 class templateformatter(baseformatter):
354 self._cache = {} # for templatekw/funcs to store reusable data
354 self._cache = {} # for templatekw/funcs to store reusable data
355 def context(self, **ctxs):
355 def context(self, **ctxs):
356 '''insert context objects to be used to render template keywords'''
356 '''insert context objects to be used to render template keywords'''
357 ctxs = pycompat.byteskwargs(ctxs)
357 assert all(k == 'ctx' for k in ctxs)
358 assert all(k == 'ctx' for k in ctxs)
358 self._item.update(ctxs)
359 self._item.update(ctxs)
359 def _showitem(self):
360 def _showitem(self):
@@ -205,6 +205,7 def hook(ui, repo, htype, throw=False, *
205 return r
205 return r
206
206
207 def runhooks(ui, repo, htype, hooks, throw=False, **args):
207 def runhooks(ui, repo, htype, hooks, throw=False, **args):
208 args = pycompat.byteskwargs(args)
208 res = {}
209 res = {}
209 oldstdout = -1
210 oldstdout = -1
210
211
General Comments 0
You need to be logged in to leave comments. Login now