comparison mercurial/localrepo.py @ 2190:b67fcd91dd1b

fix minor bugs in localrepo.hook.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Wed, 03 May 2006 11:00:24 -0700
parents b2ae81a7df29
children 05b6c13f43c6
comparison
equal deleted inserted replaced
2189:e3eba577a0ae 2190:b67fcd91dd1b
103 if not callable(obj): 103 if not callable(obj):
104 raise util.Abort(_('%s hook is invalid ' 104 raise util.Abort(_('%s hook is invalid '
105 '("%s" is not callable)') % 105 '("%s" is not callable)') %
106 (hname, funcname)) 106 (hname, funcname))
107 try: 107 try:
108 r = obj(ui=ui, repo=repo, hooktype=name, **args) 108 r = obj(ui=self.ui, repo=self, hooktype=name, **args)
109 except (KeyboardInterrupt, util.SignalInterrupt): 109 except (KeyboardInterrupt, util.SignalInterrupt):
110 raise 110 raise
111 except Exception, exc: 111 except Exception, exc:
112 if isinstance(exc, util.Abort): 112 if isinstance(exc, util.Abort):
113 self.ui.warn(_('error: %s hook failed: %s\n') % 113 self.ui.warn(_('error: %s hook failed: %s\n') %