##// END OF EJS Templates
errors: raise InputError when non-existent help section requested...
Martin von Zweigbergk -
r46887:c9b2a4d6 default
parent child Browse files
Show More
@@ -1064,7 +1064,7 b' def help_('
1064 1064 if not rst:
1065 1065 msg = _(b'no matches')
1066 1066 hint = _(b"try 'hg help' for a list of topics")
1067 raise error.Abort(msg, hint=hint)
1067 raise error.InputError(msg, hint=hint)
1068 1068 elif name and name != b'shortlist':
1069 1069 queries = []
1070 1070 if unknowncmd:
@@ -1095,7 +1095,7 b' def help_('
1095 1095 hintname = name
1096 1096 msg = _(b'no such help topic: %s') % formatname
1097 1097 hint = _(b"try 'hg help --keyword %s'") % hintname
1098 raise error.Abort(msg, hint=hint)
1098 raise error.InputError(msg, hint=hint)
1099 1099 else:
1100 1100 # program name
1101 1101 if not ui.quiet:
@@ -1155,6 +1155,6 b' def formattedhelp('
1155 1155 # to look for, or we could have simply failed to found "foo.bar"
1156 1156 # because bar isn't a section of foo
1157 1157 if section and not (blocks and name):
1158 raise error.Abort(_(b"help section not found: %s") % fullname)
1158 raise error.InputError(_(b"help section not found: %s") % fullname)
1159 1159
1160 1160 return minirst.formatplain(blocks, textwidth)
@@ -513,14 +513,14 b' Test handling of non-ASCII paths in gene'
513 513 $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help -k xyzzy
514 514 abort: no matches
515 515 (try 'hg help' for a list of topics)
516 [255]
516 [10]
517 517
518 518 $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help td > /dev/null
519 519
520 520 $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help -k xyzzy
521 521 abort: no matches
522 522 (try 'hg help' for a list of topics)
523 [255]
523 [10]
524 524
525 525 $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help td \
526 526 > | grep "^ '"
@@ -758,7 +758,7 b' Test command without options'
758 758 $ hg help foo
759 759 abort: no such help topic: foo
760 760 (try 'hg help --keyword foo')
761 [255]
761 [10]
762 762
763 763 $ hg skjdfks
764 764 hg: unknown command 'skjdfks'
@@ -1345,7 +1345,7 b' non-existent subtopics print an error'
1345 1345 $ hg help internals.foo
1346 1346 abort: no such help topic: internals.foo
1347 1347 (try 'hg help --keyword foo')
1348 [255]
1348 [10]
1349 1349
1350 1350 test advanced, deprecated and experimental options are hidden in command help
1351 1351 $ hg help debugoptADV
@@ -1479,7 +1479,7 b' Test section name with dot'
1479 1479
1480 1480 $ hg help config.annotate.git
1481 1481 abort: help section not found: config.annotate.git
1482 [255]
1482 [10]
1483 1483
1484 1484 $ hg help config.update.check
1485 1485 "commands.update.check"
@@ -1509,7 +1509,7 b' Test section name with dot'
1509 1509
1510 1510 $ hg help config.ommands.update.check
1511 1511 abort: help section not found: config.ommands.update.check
1512 [255]
1512 [10]
1513 1513
1514 1514 Unrelated trailing paragraphs shouldn't be included
1515 1515
@@ -1655,7 +1655,7 b' Test -e / -c / -k combinations'
1655 1655 $ hg help -c schemes
1656 1656 abort: no such help topic: schemes
1657 1657 (try 'hg help --keyword schemes')
1658 [255]
1658 [10]
1659 1659 $ hg help -e schemes |head -1
1660 1660 schemes extension - extend schemes with shortcuts to repository swarms
1661 1661 $ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
@@ -1670,7 +1670,7 b' Test -e / -c / -k combinations'
1670 1670 $ hg help -e commit
1671 1671 abort: no such help topic: commit
1672 1672 (try 'hg help --keyword commit')
1673 [255]
1673 [10]
1674 1674
1675 1675 Test keyword search help
1676 1676
@@ -1715,14 +1715,14 b' Test unfound topic'
1715 1715 $ hg help nonexistingtopicthatwillneverexisteverever
1716 1716 abort: no such help topic: nonexistingtopicthatwillneverexisteverever
1717 1717 (try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
1718 [255]
1718 [10]
1719 1719
1720 1720 Test unfound keyword
1721 1721
1722 1722 $ hg help --keyword nonexistingwordthatwillneverexisteverever
1723 1723 abort: no matches
1724 1724 (try 'hg help' for a list of topics)
1725 [255]
1725 [10]
1726 1726
1727 1727 Test omit indicating for help
1728 1728
@@ -1869,11 +1869,11 b' Test section lookup'
1869 1869
1870 1870 $ hg help glossary.mcguffin
1871 1871 abort: help section not found: glossary.mcguffin
1872 [255]
1872 [10]
1873 1873
1874 1874 $ hg help glossary.mc.guffin
1875 1875 abort: help section not found: glossary.mc.guffin
1876 [255]
1876 [10]
1877 1877
1878 1878 $ hg help template.files
1879 1879 files List of strings. All files modified, added, or removed by
General Comments 0
You need to be logged in to leave comments. Login now