Comments
Patch
@@ -727,6 +727,21 @@
if not secs:
# add an initial empty section
secs = [('', 0, [])]
+ if b['type'] != 'margin':
+ pointer = 1
+ bindent = b['indent']
+ while pointer < len(secs):
+ section = secs[-pointer][2][0]
+ if section['type'] != 'margin':
+ sindent = section['indent']
+ if len(section['lines']) > 1:
+ sindent += len(section['lines'][1]) - \
+ len(section['lines'][1].lstrip(' '))
+ if bindent >= sindent:
+ break
+ pointer += 1
+ if pointer > 1:
+ secs.append(('', secs[-pointer][1] + 1, []))
secs[-1][2].append(b)
return secs
@@ -922,6 +922,23 @@
"smtp.host"
Host name of mail server, e.g. "mail.example.com".
+Help subsection:
+
+ $ hg help config.charsets |grep "Email example:"|wc -l
+ 0
+
+Last item in help config.*:
+
+ $ hg help config.$(hg help config|grep '^ "'| \
+ > tail -1|sed 's![ "]*!!g')| \
+ > grep "hg help -c config"|wc -l
+ 0
+
+note to use help -c for general hg help config:
+
+ $ hg help config |grep "hg help -c config"|wc -l
+ 1
+
Test templating help
$ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '