Mercurial > hg
changeset 31509:5c9936193145
localrepo: turn hook kwargs back into strs before calling hook
It might be better to ensure that the hook kwargs dict only has str
keys on Python 3. I'm torn.
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 19 Mar 2017 01:10:02 -0400 |
parents | 590319c07259 |
children | 2244fb3eee49 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sun Mar 19 01:08:59 2017 -0400 +++ b/mercurial/localrepo.py Sun Mar 19 01:10:02 2017 -0400 @@ -1101,7 +1101,7 @@ def validate(tr): """will run pre-closing hooks""" reporef().hook('pretxnclose', throw=True, - txnname=desc, **tr.hookargs) + txnname=desc, **pycompat.strkwargs(tr.hookargs)) def releasefn(tr, success): repo = reporef() if success: @@ -1142,7 +1142,7 @@ def hook(): reporef().hook('txnclose', throw=False, txnname=desc, - **hookargs) + **pycompat.strkwargs(hookargs)) reporef()._afterlock(hook) tr.addfinalize('txnclose-hook', txnclosehook) def txnaborthook(tr2):