comparison mercurial/localrepo.py @ 1838:429bf036f2cb

Call hooks in alphabetical (=defined) order, of course still grouped by type. Output of test-hook adjusted.
author Thomas Arendsen Hein <thomas@intevation.de>
date Mon, 06 Mar 2006 17:34:49 +0100
parents bdfb524d728a
children 876e4e6ad82b
comparison
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: