Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/help.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 | a2291c9c85a1 |
children | 7a77ee434179 |
comparison
equal
deleted
inserted
replaced
26586:d51c658d3f04 | 26587:56b2bcea2529 |
---|---|
500 rst.extend(minirst.maketable(sorted(matches[t]), 1)) | 500 rst.extend(minirst.maketable(sorted(matches[t]), 1)) |
501 rst.append('\n') | 501 rst.append('\n') |
502 if not rst: | 502 if not rst: |
503 msg = _('no matches') | 503 msg = _('no matches') |
504 hint = _('try "hg help" for a list of topics') | 504 hint = _('try "hg help" for a list of topics') |
505 raise util.Abort(msg, hint=hint) | 505 raise error.Abort(msg, hint=hint) |
506 elif name and name != 'shortlist': | 506 elif name and name != 'shortlist': |
507 queries = [] | 507 queries = [] |
508 if unknowncmd: | 508 if unknowncmd: |
509 queries += [helpextcmd] | 509 queries += [helpextcmd] |
510 if opts.get('extension'): | 510 if opts.get('extension'): |
523 if unknowncmd: | 523 if unknowncmd: |
524 raise error.UnknownCommand(name) | 524 raise error.UnknownCommand(name) |
525 else: | 525 else: |
526 msg = _('no such help topic: %s') % name | 526 msg = _('no such help topic: %s') % name |
527 hint = _('try "hg help --keyword %s"') % name | 527 hint = _('try "hg help --keyword %s"') % name |
528 raise util.Abort(msg, hint=hint) | 528 raise error.Abort(msg, hint=hint) |
529 else: | 529 else: |
530 # program name | 530 # program name |
531 if not ui.quiet: | 531 if not ui.quiet: |
532 rst = [_("Mercurial Distributed SCM\n"), '\n'] | 532 rst = [_("Mercurial Distributed SCM\n"), '\n'] |
533 rst.extend(helplist()) | 533 rst.extend(helplist()) |