mercurial/hook.py
changeset 7644 182b7114d35a
parent 7416 196b05a548d0
child 7787 b8d750daadde
equal deleted inserted replaced
7643:9a1ea6587557 7644:182b7114d35a
    47             raise util.Abort(_('%s hook is invalid '
    47             raise util.Abort(_('%s hook is invalid '
    48                                '("%s" is not callable)') %
    48                                '("%s" is not callable)') %
    49                              (hname, funcname))
    49                              (hname, funcname))
    50     try:
    50     try:
    51         r = obj(ui=ui, repo=repo, hooktype=name, **args)
    51         r = obj(ui=ui, repo=repo, hooktype=name, **args)
    52     except (KeyboardInterrupt, util.SignalInterrupt):
    52     except KeyboardInterrupt:
    53         raise
    53         raise
    54     except Exception, exc:
    54     except Exception, exc:
    55         if isinstance(exc, util.Abort):
    55         if isinstance(exc, util.Abort):
    56             ui.warn(_('error: %s hook failed: %s\n') %
    56             ui.warn(_('error: %s hook failed: %s\n') %
    57                          (hname, exc.args[0]))
    57                          (hname, exc.args[0]))