Mercurial > public > mercurial-scm > hg-stable
diff hgext/schemes.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 | 80c5b2666a96 |
children | d630eac3a5db |
line wrap: on
line diff
--- a/hgext/schemes.py Mon Oct 05 22:49:24 2015 -0700 +++ b/hgext/schemes.py Thu Oct 08 12:55:45 2015 -0700 @@ -41,7 +41,7 @@ """ import os, re -from mercurial import extensions, hg, templater, util +from mercurial import extensions, hg, templater, util, error from mercurial.i18n import _ # Note for extension authors: ONLY specify testedwith = 'internal' for @@ -69,7 +69,7 @@ try: url = url.split('://', 1)[1] except IndexError: - raise util.Abort(_("no '://' in scheme url '%s'") % url) + raise error.Abort(_("no '://' in scheme url '%s'") % url) parts = url.split('/', self.parts) if len(parts) > self.parts: tail = parts[-1] @@ -101,7 +101,7 @@ for scheme, url in schemes.items(): if (os.name == 'nt' and len(scheme) == 1 and scheme.isalpha() and os.path.exists('%s:\\' % scheme)): - raise util.Abort(_('custom scheme %s:// conflicts with drive ' + raise error.Abort(_('custom scheme %s:// conflicts with drive ' 'letter %s:\\\n') % (scheme, scheme.upper())) hg.schemes[scheme] = ShortRepository(url, scheme, t)