# HG changeset patch # User Pulkit Goyal # Date 1536070770 -10800 # Node ID 3694c9aaf5e4254b405f3a1ca8e27e4b05960ba7 # Parent 34fe76b31ca4c893dcf82626926e9b68c5dea3aa py3: handle keyword arguments correctly in hgext/acl.py The keys of keyword arguments on python 3 should be str, so when we try to get some key from them, we must make sure we are using str. # skip-blame because just b'' prefix Differential Revision: https://phab.mercurial-scm.org/D4455 diff -r 34fe76b31ca4 -r 3694c9aaf5e4 hgext/acl.py --- a/hgext/acl.py Tue Sep 04 17:16:29 2018 +0300 +++ b/hgext/acl.py Tue Sep 04 17:19:30 2018 +0300 @@ -375,9 +375,9 @@ _txnhook(ui, repo, hooktype, node, source, user, **kwargs) def _pkhook(ui, repo, hooktype, node, source, user, **kwargs): - if kwargs['namespace'] == 'bookmarks': - bookmark = kwargs['key'] - ctx = kwargs['new'] + if kwargs[r'namespace'] == 'bookmarks': + bookmark = kwargs[r'key'] + ctx = kwargs[r'new'] allowbookmarks = buildmatch(ui, None, user, 'acl.allow.bookmarks') denybookmarks = buildmatch(ui, None, user, 'acl.deny.bookmarks')