Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hook.py @ 38628:539f9708b980
hook: narrow the 'priority' prefix check to align with the documentation
A prefix like 'priorityfoo' is meaningless, but `hg help config.hooks` calls out
the dot.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 07 Jul 2018 23:47:49 -0400 |
parents | 72286f9e324f |
children | 38dfd308fe9d |
comparison
equal
deleted
inserted
replaced
38627:93ed193bc03e | 38628:539f9708b980 |
---|---|
179 | 179 |
180 def _hookitems(ui, _untrusted=False): | 180 def _hookitems(ui, _untrusted=False): |
181 """return all hooks items ready to be sorted""" | 181 """return all hooks items ready to be sorted""" |
182 hooks = {} | 182 hooks = {} |
183 for name, cmd in ui.configitems('hooks', untrusted=_untrusted): | 183 for name, cmd in ui.configitems('hooks', untrusted=_untrusted): |
184 if not name.startswith('priority'): | 184 if not name.startswith('priority.'): |
185 priority = ui.configint('hooks', 'priority.%s' % name, 0) | 185 priority = ui.configint('hooks', 'priority.%s' % name, 0) |
186 hooks[name] = (-priority, len(hooks), name, cmd) | 186 hooks[name] = (-priority, len(hooks), name, cmd) |
187 return hooks | 187 return hooks |
188 | 188 |
189 _redirect = False | 189 _redirect = False |