Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/help.py @ 29759:aba2bb2a6d0f
help: don't try to render a section on sub-topics
This patch subtly changes the behavior of the parsing of "X.Y" values
to not set the "section" variable when rendering a known sub-topic.
Previously, "section" would be the same as the sub-topic name. This
required the sub-topic RST to have a section named the same as the
sub-topic name.
When I made this change, the descriptions from help.internalstable
started being rendered in command line output. This didn't look correct
to me, as it didn't match the formatting of main help pages. I
corrected this by moving the top section to help.internalstable and
changing the section levels of all the "internals" topics.
The end result is that "internals" topics now match the rendering of
main topics on both the CLI and HTML. And, "internals" topics no longer
require a main section matching the name of the topic.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 06 Aug 2016 17:04:22 -0700 |
parents | 3640c1702c43 |
children | a1092e2d70a3 |
comparison
equal
deleted
inserted
replaced
29758:3dbc95f3eb31 | 29759:aba2bb2a6d0f |
---|---|
182 return doc | 182 return doc |
183 | 183 |
184 return loader | 184 return loader |
185 | 185 |
186 internalstable = sorted([ | 186 internalstable = sorted([ |
187 (['bundles'], _('container for exchange of repository data'), | 187 (['bundles'], _('Bundles'), |
188 loaddoc('bundles', subdir='internals')), | 188 loaddoc('bundles', subdir='internals')), |
189 (['changegroups'], _('representation of revlog data'), | 189 (['changegroups'], _('Changegroups'), |
190 loaddoc('changegroups', subdir='internals')), | 190 loaddoc('changegroups', subdir='internals')), |
191 (['requirements'], _('repository requirements'), | 191 (['requirements'], _('Repository Requirements'), |
192 loaddoc('requirements', subdir='internals')), | 192 loaddoc('requirements', subdir='internals')), |
193 (['revlogs'], _('revision storage mechanism'), | 193 (['revlogs'], _('Revision Logs'), |
194 loaddoc('revlogs', subdir='internals')), | 194 loaddoc('revlogs', subdir='internals')), |
195 ]) | 195 ]) |
196 | 196 |
197 def internalshelp(ui): | 197 def internalshelp(ui): |
198 """Generate the index for the "internals" topic.""" | 198 """Generate the index for the "internals" topic.""" |