diff mercurial/parser.py @ 29059:8eba4cdcfd81

parser: shorten prefix of alias parsing errors These messages seemed to be a bit long. We should try making them fit to 80-col console.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 17 Apr 2016 12:31:06 +0900
parents dbed4c4f48ae
children e5b794063fd4
line wrap: on
line diff
--- a/mercurial/parser.py	Sun Apr 17 12:20:57 2016 +0900
+++ b/mercurial/parser.py	Sun Apr 17 12:31:06 2016 +0900
@@ -447,15 +447,13 @@
         repl = efmt = None
         name, args, err = cls._builddecl(decl)
         if err:
-            efmt = _('failed to parse the declaration of %(section)s '
-                     '"%(name)s": %(error)s')
+            efmt = _('bad declaration of %(section)s "%(name)s": %(error)s')
         else:
             try:
                 repl = cls._builddefn(defn, args)
             except error.ParseError as inst:
                 err = parseerrordetail(inst)
-                efmt = _('failed to parse the definition of %(section)s '
-                         '"%(name)s": %(error)s')
+                efmt = _('bad definition of %(section)s "%(name)s": %(error)s')
         if err:
             err = efmt % {'section': cls._section, 'name': name, 'error': err}
         return alias(name, args, err, repl)