diff mercurial/dispatch.py @ 11574:6381fa7bfa53

Abort: add a hint argument, printed in the next line inside parenthesis discovery was using a custom made message for this purpose push now returns -1 after aborting, instead of 1 previously
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 15 Jul 2010 14:41:22 +0200
parents c20c2c4c0c63
children 4d9b4725acac
line wrap: on
line diff
--- a/mercurial/dispatch.py	Thu Jul 15 14:40:17 2010 +0200
+++ b/mercurial/dispatch.py	Thu Jul 15 14:41:22 2010 +0200
@@ -23,6 +23,8 @@
             u.setconfig('ui', 'traceback', 'on')
     except util.Abort, inst:
         sys.stderr.write(_("abort: %s\n") % inst)
+        if inst.hint:
+            sys.stdout.write(_("(%s)\n") % inst.hint)
         return -1
     except error.ParseError, inst:
         if len(inst.args) > 1:
@@ -116,6 +118,8 @@
             commands.help_(ui, 'shortlist')
     except util.Abort, inst:
         ui.warn(_("abort: %s\n") % inst)
+        if inst.hint:
+            ui.status(_("(%s)\n") % inst.hint)
     except ImportError, inst:
         ui.warn(_("abort: %s!\n") % inst)
         m = str(inst).split()[-1]