Mercurial > hg
diff hgext/convert/hg.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 | 242853e14804 |
children | fdd63acf3215 |
line wrap: on
line diff
--- a/hgext/convert/hg.py Mon Oct 05 22:49:24 2015 -0700 +++ b/hgext/convert/hg.py Thu Oct 08 12:55:45 2015 -0700 @@ -205,7 +205,7 @@ # If the file requires actual merging, abort. We don't have enough # context to resolve merges correctly. if action in ['m', 'dm', 'cd', 'dc']: - raise util.Abort(_("unable to convert merge commit " + raise error.Abort(_("unable to convert merge commit " "since target parents do not merge cleanly (file " "%s, parents %s and %s)") % (file, p1ctx, p2ctx)) @@ -423,7 +423,7 @@ def hascommitforsplicemap(self, rev): if rev not in self.repo and self.clonebranches: - raise util.Abort(_('revision %s not found in destination ' + raise error.Abort(_('revision %s not found in destination ' 'repository (lookups with clonebranches=true ' 'are not implemented)') % rev) return rev in self.repo @@ -455,7 +455,7 @@ try: startnode = self.repo.lookup(startnode) except error.RepoError: - raise util.Abort(_('%s is not a valid start revision') + raise error.Abort(_('%s is not a valid start revision') % startnode) startrev = self.repo.changelog.rev(startnode) children = {startnode: 1} @@ -470,7 +470,7 @@ self._heads = self.repo.heads() else: if revs or startnode is not None: - raise util.Abort(_('hg.revs cannot be combined with ' + raise error.Abort(_('hg.revs cannot be combined with ' 'hg.startrev or --rev')) nodes = set() parents = set()