Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hook.py @ 31752:aff7b32b3c05
hook: add hook name information to external hook
While we are here, we can also add the hook name information to external hook.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 31 Mar 2017 11:53:56 +0200 |
parents | 0fa30fbccc34 |
children | 4b426ae96ff2 |
comparison
equal
deleted
inserted
replaced
31751:0fa30fbccc34 | 31752:aff7b32b3c05 |
---|---|
125 tr = repo.currenttransaction() | 125 tr = repo.currenttransaction() |
126 repo.dirstate.write(tr) | 126 repo.dirstate.write(tr) |
127 if tr and tr.writepending(): | 127 if tr and tr.writepending(): |
128 env['HG_PENDING'] = repo.root | 128 env['HG_PENDING'] = repo.root |
129 env['HG_HOOKTYPE'] = htype | 129 env['HG_HOOKTYPE'] = htype |
130 env['HG_HOOKNAME'] = name | |
130 | 131 |
131 for k, v in args.iteritems(): | 132 for k, v in args.iteritems(): |
132 if callable(v): | 133 if callable(v): |
133 v = v() | 134 v = v() |
134 if isinstance(v, dict): | 135 if isinstance(v, dict): |