Show More
@@ -107,8 +107,11 def topicmatch(kw): | |||
|
107 | 107 | for cmd, entry in getattr(mod, 'cmdtable', {}).iteritems(): |
|
108 | 108 | if kw in cmd or (len(entry) > 2 and lowercontains(entry[2])): |
|
109 | 109 | cmdname = cmd.split('|')[0].lstrip('^') |
|
110 | cmddoc=getattr(mod, '__doc__', '').splitlines()[0] | |
|
111 | results['extensioncommands'].append((cmdname, _(cmddoc))) | |
|
110 | if mod.__doc__: | |
|
111 | cmddoc = gettext(mod.__doc__).splitlines()[0] | |
|
112 | else: | |
|
113 | cmddoc = _('(no help text available)') | |
|
114 | results['extensioncommands'].append((cmdname, cmddoc)) | |
|
112 | 115 | return results |
|
113 | 116 | |
|
114 | 117 | def loaddoc(topic): |
@@ -598,6 +598,15 Test command with no help text | |||
|
598 | 598 | |
|
599 | 599 | use "hg -v help nohelp" to show more info |
|
600 | 600 | |
|
601 | $ hg help -k nohelp | |
|
602 | Commands: | |
|
603 | ||
|
604 | nohelp hg nohelp | |
|
605 | ||
|
606 | Extension Commands: | |
|
607 | ||
|
608 | nohelp (no help text available) | |
|
609 | ||
|
601 | 610 | Test that default list of commands omits extension commands |
|
602 | 611 | |
|
603 | 612 | $ hg help |
General Comments 0
You need to be logged in to leave comments.
Login now