Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
26586:d51c658d3f04 | 26587:56b2bcea2529 |
---|---|
8 | 8 |
9 '''setup for largefiles repositories: reposetup''' | 9 '''setup for largefiles repositories: reposetup''' |
10 import copy | 10 import copy |
11 import os | 11 import os |
12 | 12 |
13 from mercurial import error, match as match_, util | 13 from mercurial import error, match as match_, error |
14 from mercurial.i18n import _ | 14 from mercurial.i18n import _ |
15 from mercurial import scmutil, localrepo | 15 from mercurial import scmutil, localrepo |
16 | 16 |
17 import lfcommands | 17 import lfcommands |
18 import lfutil | 18 import lfutil |
278 missing = set(self.requirements) - remote.local().supported | 278 missing = set(self.requirements) - remote.local().supported |
279 if missing: | 279 if missing: |
280 msg = _("required features are not" | 280 msg = _("required features are not" |
281 " supported in the destination:" | 281 " supported in the destination:" |
282 " %s") % (', '.join(sorted(missing))) | 282 " %s") % (', '.join(sorted(missing))) |
283 raise util.Abort(msg) | 283 raise error.Abort(msg) |
284 return super(lfilesrepo, self).push(remote, force=force, revs=revs, | 284 return super(lfilesrepo, self).push(remote, force=force, revs=revs, |
285 newbranch=newbranch) | 285 newbranch=newbranch) |
286 | 286 |
287 # TODO: _subdirlfs should be moved into "lfutil.py", because | 287 # TODO: _subdirlfs should be moved into "lfutil.py", because |
288 # it is referred only from "lfutil.updatestandinsbymatch" | 288 # it is referred only from "lfutil.updatestandinsbymatch" |
302 dirs = [] | 302 dirs = [] |
303 regulars = [] | 303 regulars = [] |
304 | 304 |
305 for f in files: | 305 for f in files: |
306 if lfutil.isstandin(f + '/'): | 306 if lfutil.isstandin(f + '/'): |
307 raise util.Abort( | 307 raise error.Abort( |
308 _('file "%s" is a largefile standin') % f, | 308 _('file "%s" is a largefile standin') % f, |
309 hint=('commit the largefile itself instead')) | 309 hint=('commit the largefile itself instead')) |
310 # Scan directories | 310 # Scan directories |
311 if os.path.isdir(self.wjoin(f)): | 311 if os.path.isdir(self.wjoin(f)): |
312 dirs.append(f) | 312 dirs.append(f) |