Mercurial > hg
diff hgext/fetch.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 | 9dcc9ed26d33 |
line wrap: on
line diff
--- a/hgext/fetch.py Mon Oct 05 22:49:24 2015 -0700 +++ b/hgext/fetch.py Thu Oct 08 12:55:45 2015 -0700 @@ -60,7 +60,7 @@ except error.RepoLookupError: branchnode = None if parent != branchnode: - raise util.Abort(_('working directory not at branch tip'), + raise error.Abort(_('working directory not at branch tip'), hint=_('use "hg update" to check out branch tip')) wlock = lock = None @@ -73,7 +73,7 @@ bheads = repo.branchheads(branch) bheads = [head for head in bheads if len(repo[head].children()) == 0] if len(bheads) > 1: - raise util.Abort(_('multiple heads in this branch ' + raise error.Abort(_('multiple heads in this branch ' '(use "hg heads ." and "hg merge" to merge)')) other = hg.peer(repo, opts, ui.expandpath(source)) @@ -86,7 +86,7 @@ except error.CapabilityError: err = _("other repository doesn't support revision lookup, " "so a rev cannot be specified.") - raise util.Abort(err) + raise error.Abort(err) # Are there any changes at all? modheads = exchange.pull(repo, other, heads=revs).cgresult