Mercurial > public > mercurial-scm > hg-stable
diff mercurial/simplemerge.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 | ed12abab068e |
children | ef1eb6df7071 |
line wrap: on
line diff
--- a/mercurial/simplemerge.py Mon Oct 05 22:49:24 2015 -0700 +++ b/mercurial/simplemerge.py Thu Oct 08 12:55:45 2015 -0700 @@ -23,6 +23,7 @@ from .i18n import _ from . import ( + error, mdiff, scmutil, util, @@ -361,7 +362,7 @@ if not opts.get('quiet'): ui.warn(_('warning: %s\n') % msg) if not opts.get('text'): - raise util.Abort(msg) + raise error.Abort(msg) return text mode = opts.get('mode','merge') @@ -381,13 +382,13 @@ if len(labels) > 2: name_base = labels[2] if len(labels) > 3: - raise util.Abort(_("can only specify three labels.")) + raise error.Abort(_("can only specify three labels.")) try: localtext = readfile(local) basetext = readfile(base) othertext = readfile(other) - except util.Abort: + except error.Abort: return 1 local = os.path.realpath(local)