hook: narrow the 'priority' prefix check to align with the documentation
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 07 Jul 2018 23:47:49 -0400
changeset 38628 539f9708b980
parent 38627 93ed193bc03e
child 38629 38dfd308fe9d
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.
mercurial/hook.py
--- a/mercurial/hook.py	Sat Jul 07 22:13:56 2018 -0400
+++ b/mercurial/hook.py	Sat Jul 07 23:47:49 2018 -0400
@@ -181,7 +181,7 @@
     """return all hooks items ready to be sorted"""
     hooks = {}
     for name, cmd in ui.configitems('hooks', untrusted=_untrusted):
-        if not name.startswith('priority'):
+        if not name.startswith('priority.'):
             priority = ui.configint('hooks', 'priority.%s' % name, 0)
             hooks[name] = (-priority, len(hooks), name, cmd)
     return hooks