Mercurial > hg
diff mercurial/dispatch.py @ 38768:afc4ad706f9c
dispatch: making all hg abortions be output with a specific label
This allows abortions to be highlighted specially and separately
from warnings - for instance, red is a reasonable color for when hg
aborts, but is overly dramatic for most warnings produced elsewhere.
Differential Revision: https://phab.mercurial-scm.org/D3967
author | Rodrigo Damazio Bovendorp <rdamazio@google.com> |
---|---|
date | Thu, 19 Jul 2018 23:22:05 -0700 |
parents | b86664c81833 |
children | 5199c5b6fd29 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Thu Jul 19 15:21:28 2018 -0400 +++ b/mercurial/dispatch.py Thu Jul 19 23:22:05 2018 -0700 @@ -212,9 +212,9 @@ try: ret = _runcatch(req) or 0 except error.ProgrammingError as inst: - req.ui.warn(_('** ProgrammingError: %s\n') % inst) + req.ui.error(_('** ProgrammingError: %s\n') % inst) if inst.hint: - req.ui.warn(_('** (%s)\n') % inst.hint) + req.ui.error(_('** (%s)\n') % inst.hint) raise except KeyboardInterrupt as inst: try: @@ -222,7 +222,7 @@ msg = _("killed!\n") else: msg = _("interrupted!\n") - req.ui.warn(msg) + req.ui.error(msg) except error.SignalInterrupt: # maybe pager would quit without consuming all the output, and # SIGPIPE was raised. we cannot print anything in this case.