Patchwork D1633: py3: handle keyword arguments correctly in hook.py

login
register
mail settings
Submitter phabricator
Date Dec. 10, 2017, 1:09 a.m.
Message ID <differential-rev-PHID-DREV-mvu572lewfwlnu6u4wou-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26151/
State Superseded
Headers show

Comments

phabricator - Dec. 10, 2017, 1:09 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1633

AFFECTED FILES
  mercurial/hook.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/hook.py b/mercurial/hook.py
--- a/mercurial/hook.py
+++ b/mercurial/hook.py
@@ -91,7 +91,7 @@ 
     starttime = util.timer()
 
     try:
-        r = obj(ui=ui, repo=repo, hooktype=htype, **args)
+        r = obj(ui=ui, repo=repo, hooktype=htype, **pycompat.strkwargs(args))
     except Exception as exc:
         if isinstance(exc, error.Abort):
             ui.warn(_('error: %s hook failed: %s\n') %