equal
deleted
inserted
replaced
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') % |