Mercurial > public > mercurial-scm > hg
diff hgext/record.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 | 08f2177b15c7 |
children | 44ffbb2a4f59 |
line wrap: on
line diff
--- a/hgext/record.py Mon Oct 05 22:49:24 2015 -0700 +++ b/hgext/record.py Thu Oct 08 12:55:45 2015 -0700 @@ -9,7 +9,7 @@ from mercurial.i18n import _ from mercurial import cmdutil, commands, extensions -from mercurial import util +from mercurial import error cmdtable = {} command = cmdutil.command(cmdtable) @@ -54,7 +54,7 @@ This command is not available when committing a merge.''' if not ui.interactive(): - raise util.Abort(_('running non-interactively, use %s instead') % + raise error.Abort(_('running non-interactively, use %s instead') % 'commit') opts["interactive"] = True @@ -99,7 +99,7 @@ try: mq = extensions.find('mq') except KeyError: - raise util.Abort(_("'mq' extension not loaded")) + raise error.Abort(_("'mq' extension not loaded")) repo.mq.checkpatchname(patch)