Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/fileset.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 | d3dbb65c8dc6 |
children | d5a6be56970b |
comparison
equal
deleted
inserted
replaced
26586:d51c658d3f04 | 26587:56b2bcea2529 |
---|---|
361 for f in mctx.existing(): | 361 for f in mctx.existing(): |
362 d = mctx.ctx[f].data() | 362 d = mctx.ctx[f].data() |
363 try: | 363 try: |
364 d.decode(enc) | 364 d.decode(enc) |
365 except LookupError: | 365 except LookupError: |
366 raise util.Abort(_("unknown encoding '%s'") % enc) | 366 raise error.Abort(_("unknown encoding '%s'") % enc) |
367 except UnicodeDecodeError: | 367 except UnicodeDecodeError: |
368 continue | 368 continue |
369 s.append(f) | 369 s.append(f) |
370 | 370 |
371 return s | 371 return s |