Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hook.py @ 35366:056a9c8813aa
py3: handle keyword arguments correctly in hook.py
Differential Revision: https://phab.mercurial-scm.org/D1633
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 10 Dec 2017 04:46:50 +0530 |
parents | e79b6300d97c |
children | c4146cf4dd20 |
comparison
equal
deleted
inserted
replaced
35365:7f410793c04d | 35366:056a9c8813aa |
---|---|
89 | 89 |
90 ui.note(_("calling hook %s: %s\n") % (hname, funcname)) | 90 ui.note(_("calling hook %s: %s\n") % (hname, funcname)) |
91 starttime = util.timer() | 91 starttime = util.timer() |
92 | 92 |
93 try: | 93 try: |
94 r = obj(ui=ui, repo=repo, hooktype=htype, **args) | 94 r = obj(ui=ui, repo=repo, hooktype=htype, **pycompat.strkwargs(args)) |
95 except Exception as exc: | 95 except Exception as exc: |
96 if isinstance(exc, error.Abort): | 96 if isinstance(exc, error.Abort): |
97 ui.warn(_('error: %s hook failed: %s\n') % | 97 ui.warn(_('error: %s hook failed: %s\n') % |
98 (hname, exc.args[0])) | 98 (hname, exc.args[0])) |
99 else: | 99 else: |