Mercurial > hg-stable
diff mercurial/templater.py @ 26587:56b2bcea2529
error: get Abort from 'error' instead of 'util'
The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be
confused about that and gives all the credit to 'util' instead of the
hardworking 'error'. In a spirit of equity, we break the cycle of injustice and
give back to 'error' the respect it deserves. And screw that 'util' poser.
For great justice.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 08 Oct 2015 12:55:45 -0700 |
parents | bed9e6c706f6 |
children | 9e06e7fb037d |
line wrap: on
line diff
--- a/mercurial/templater.py Mon Oct 05 22:49:24 2015 -0700 +++ b/mercurial/templater.py Thu Oct 08 12:55:45 2015 -0700 @@ -270,7 +270,7 @@ dt = arg[1][1] else: dt = arg[1] - raise util.Abort(_("template filter '%s' is not compatible with " + raise error.Abort(_("template filter '%s' is not compatible with " "keyword '%s'") % (filt.func_name, dt)) def buildmap(exp, context): @@ -840,7 +840,7 @@ stylelist.append(split[1]) return ", ".join(sorted(stylelist)) -class TemplateNotFound(util.Abort): +class TemplateNotFound(error.Abort): pass class templater(object): @@ -873,7 +873,7 @@ if not mapfile: return if not os.path.exists(mapfile): - raise util.Abort(_("style '%s' not found") % mapfile, + raise error.Abort(_("style '%s' not found") % mapfile, hint=_("available styles: %s") % stylelist()) conf = config.config(includepaths=templatepaths())