mercurial/localrepo.py
changeset 1838 429bf036f2cb
parent 1835 bdfb524d728a
child 1839 876e4e6ad82b
equal deleted inserted replaced
1836:cd5c1db2132a 1838:429bf036f2cb
    83                 self.ui.warn(_('error: %s hook %s\n') % (name, desc))
    83                 self.ui.warn(_('error: %s hook %s\n') % (name, desc))
    84                 return False
    84                 return False
    85             return True
    85             return True
    86 
    86 
    87         r = True
    87         r = True
    88         for hname, cmd in self.ui.configitems("hooks"):
    88         hooks = [(hname, cmd) for hname, cmd in self.ui.configitems("hooks")
    89             s = hname.split(".")
    89                  if hname.split(".", 1)[0] == name and cmd]
    90             if s[0] == name and cmd:
    90         hooks.sort()
    91                 r = runhook(hname, cmd) and r
    91         for hname, cmd in hooks:
       
    92             r = runhook(hname, cmd) and r
    92         return r
    93         return r
    93 
    94 
    94     def tags(self):
    95     def tags(self):
    95         '''return a mapping of tag to node'''
    96         '''return a mapping of tag to node'''
    96         if not self.tagscache:
    97         if not self.tagscache: