mercurial/localrepo.py
changeset 2190 b67fcd91dd1b
parent 2175 b2ae81a7df29
child 2221 05b6c13f43c6
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') %