Mercurial > hg
diff hgext/largefiles/reposetup.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 | 3f0744eeaeaf |
children | 002108b219e3 |
line wrap: on
line diff
--- a/hgext/largefiles/reposetup.py Mon Oct 05 22:49:24 2015 -0700 +++ b/hgext/largefiles/reposetup.py Thu Oct 08 12:55:45 2015 -0700 @@ -10,7 +10,7 @@ import copy import os -from mercurial import error, match as match_, util +from mercurial import error, match as match_, error from mercurial.i18n import _ from mercurial import scmutil, localrepo @@ -280,7 +280,7 @@ msg = _("required features are not" " supported in the destination:" " %s") % (', '.join(sorted(missing))) - raise util.Abort(msg) + raise error.Abort(msg) return super(lfilesrepo, self).push(remote, force=force, revs=revs, newbranch=newbranch) @@ -304,7 +304,7 @@ for f in files: if lfutil.isstandin(f + '/'): - raise util.Abort( + raise error.Abort( _('file "%s" is a largefile standin') % f, hint=('commit the largefile itself instead')) # Scan directories