Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 36430:7b86aa31b004
py3: fix handling of keyword arguments at more places
The keys of keyword arguments of Python 3 should be str, which is why we need to
prevent getting the b'' prefix added by the transformer or convert keys to str
using pycompat.strkwargs()
Differential Revision: https://phab.mercurial-scm.org/D2420
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 24 Feb 2018 16:18:40 +0530 |
parents | 0147a4730420 |
children | 04c319a07c7b |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat Feb 24 16:16:14 2018 +0530 +++ b/mercurial/localrepo.py Sat Feb 24 16:18:40 2018 +0530 @@ -2170,10 +2170,11 @@ hookargs = {} if tr is not None: hookargs.update(tr.hookargs) - hookargs['namespace'] = namespace - hookargs['key'] = key - hookargs['old'] = old - hookargs['new'] = new + hookargs = pycompat.strkwargs(hookargs) + hookargs[r'namespace'] = namespace + hookargs[r'key'] = key + hookargs[r'old'] = old + hookargs[r'new'] = new self.hook('prepushkey', throw=True, **hookargs) except error.HookAbort as exc: self.ui.write_err(_("pushkey-abort: %s\n") % exc)