Mercurial > hg
comparison mercurial/hook.py @ 7644:182b7114d35a
error: move SignalInterrupt
now derived from KeyboardInterrupt to simplify catches
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 12 Jan 2009 11:48:05 -0600 |
parents | 196b05a548d0 |
children | b8d750daadde |
comparison
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])) |