Mercurial > hg
diff hgext/extdiff.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 | d1530c6e8613 |
children | c750245c6b85 |
line wrap: on
line diff
--- a/hgext/extdiff.py Mon Oct 05 22:49:24 2015 -0700 +++ b/hgext/extdiff.py Thu Oct 08 12:55:45 2015 -0700 @@ -63,7 +63,7 @@ from mercurial.i18n import _ from mercurial.node import short, nullid from mercurial import cmdutil, scmutil, util, commands, encoding, filemerge -from mercurial import archival +from mercurial import archival, error import os, shlex, shutil, tempfile, re cmdtable = {} @@ -127,7 +127,7 @@ if revs and change: msg = _('cannot specify --rev and --change at the same time') - raise util.Abort(msg) + raise error.Abort(msg) elif change: node2 = scmutil.revsingle(repo, change, None).node() node1a, node1b = repo.changelog.parents(node2) @@ -149,9 +149,9 @@ if opts.get('patch'): if subrepos: - raise util.Abort(_('--patch cannot be used with --subrepos')) + raise error.Abort(_('--patch cannot be used with --subrepos')) if node2 is None: - raise util.Abort(_('--patch requires two revisions')) + raise error.Abort(_('--patch requires two revisions')) else: mod_a, add_a, rem_a = map(set, repo.status(node1a, node2, matcher, listsubrepos=subrepos)[:3])