mercurial/hook.py
branchstable
changeset 46490 86b019899737
parent 46137 8fa87bce4929
child 46492 7289eac777ec
equal deleted inserted replaced
46489:fb6eca7b8c63 46490:86b019899737
   222 
   222 
   223 def _hookitems(ui, _untrusted=False):
   223 def _hookitems(ui, _untrusted=False):
   224     """return all hooks items ready to be sorted"""
   224     """return all hooks items ready to be sorted"""
   225     hooks = {}
   225     hooks = {}
   226     for name, cmd in ui.configitems(b'hooks', untrusted=_untrusted):
   226     for name, cmd in ui.configitems(b'hooks', untrusted=_untrusted):
   227         if name.startswith(b'priority.') or name.startswith(b'tonative.'):
   227         if (
       
   228             name.startswith(b'priority.')
       
   229             or name.startswith(b'tonative.')
       
   230             or b':' in name
       
   231         ):
   228             continue
   232             continue
   229 
   233 
   230         priority = ui.configint(b'hooks', b'priority.%s' % name, 0)
   234         priority = ui.configint(b'hooks', b'priority.%s' % name, 0)
   231         hooks[name] = ((-priority,), (len(hooks),), name, cmd)
   235         hooks[name] = ((-priority,), (len(hooks),), name, cmd)
   232     return hooks
   236     return hooks