##// END OF EJS Templates
help: support 'hg help template.somekeyword'...
Matt Harbison -
r25723:2a8d8b40 default
parent child Browse files
Show More
@@ -682,7 +682,10 b' def getsections(blocks):'
682 secs = []
682 secs = []
683
683
684 def getname(b):
684 def getname(b):
685 x = b['lines'][0]
685 if b['type'] == 'field':
686 x = b['key']
687 else:
688 x = b['lines'][0]
686 x = x.lower().strip('"')
689 x = x.lower().strip('"')
687 if '(' in x:
690 if '(' in x:
688 x = x.split('(')[0]
691 x = x.split('(')[0]
@@ -696,7 +699,7 b' def getsections(blocks):'
696 level = nest.index(i) + 1
699 level = nest.index(i) + 1
697 nest = nest[:level]
700 nest = nest[:level]
698 secs.append((getname(b), level, [b]))
701 secs.append((getname(b), level, [b]))
699 elif b['type'] == 'definition':
702 elif b['type'] in ('definition', 'field'):
700 i = ' '
703 i = ' '
701 if i not in nest:
704 if i not in nest:
702 nest += i
705 nest += i
@@ -1117,6 +1117,10 b' Test section lookup'
1117 abort: help section not found
1117 abort: help section not found
1118 [255]
1118 [255]
1119
1119
1120 $ hg help template.files
1121 files List of strings. All files modified, added, or removed by
1122 this changeset.
1123
1120 Test dynamic list of merge tools only shows up once
1124 Test dynamic list of merge tools only shows up once
1121 $ hg help merge-tools
1125 $ hg help merge-tools
1122 Merge Tools
1126 Merge Tools
General Comments 0
You need to be logged in to leave comments. Login now