Mercurial > public > mercurial-scm > hg
diff hgext/purge.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 | 4b0fc75f9403 |
children | 27996f78a64c |
line wrap: on
line diff
--- a/hgext/purge.py Mon Oct 05 22:49:24 2015 -0700 +++ b/hgext/purge.py Thu Oct 08 12:55:45 2015 -0700 @@ -24,7 +24,7 @@ '''command to delete untracked files from the working directory''' -from mercurial import util, commands, cmdutil, scmutil +from mercurial import util, commands, cmdutil, scmutil, error from mercurial.i18n import _ import os @@ -94,7 +94,7 @@ except OSError: m = _('%s cannot be removed') % name if opts['abort_on_err']: - raise util.Abort(m) + raise error.Abort(m) ui.warn(_('warning: %s\n') % m) else: ui.write('%s%s' % (name, eol))