Mercurial > hg
diff tests/autodiff.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 | f78192115229 |
children | 3b517f2a3989 |
line wrap: on
line diff
--- a/tests/autodiff.py Mon Oct 05 22:49:24 2015 -0700 +++ b/tests/autodiff.py Thu Oct 08 12:55:45 2015 -0700 @@ -1,7 +1,7 @@ # Extension dedicated to test patch.diff() upgrade modes # # -from mercurial import cmdutil, scmutil, patch, util +from mercurial import cmdutil, scmutil, patch, error cmdtable = {} command = cmdutil.command(cmdtable) @@ -30,9 +30,9 @@ diffopts.git = False diffopts.upgrade = True def losedatafn(fn=None, **kwargs): - raise util.Abort('losing data for %s' % fn) + raise error.Abort('losing data for %s' % fn) else: - raise util.Abort('--git must be yes, no or auto') + raise error.Abort('--git must be yes, no or auto') node1, node2 = scmutil.revpair(repo, []) m = scmutil.match(repo[node2], pats, opts)