Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/help.py @ 27376:fc810d950278
help: add "internals" topic
We introduce the "internals" help topic, which renders an index of
available sub-topics. The sub-topics themselves are still not
reachable via the help system.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 13 Dec 2015 10:35:03 -0800 |
parents | c4a062d090ee |
children | d1c998d7b103 |
comparison
equal
deleted
inserted
replaced
27375:c4a062d090ee | 27376:fc810d950278 |
---|---|
159 doc = rewriter(ui, topic, doc) | 159 doc = rewriter(ui, topic, doc) |
160 return doc | 160 return doc |
161 | 161 |
162 return loader | 162 return loader |
163 | 163 |
164 internalstable = sorted([ | |
165 (['bundles'], _('container for exchange of repository data'), | |
166 loaddoc('bundles', subdir='internals')), | |
167 (['changegroups'], _('representation of revlog data'), | |
168 loaddoc('changegroups', subdir='internals')), | |
169 ]) | |
170 | |
171 def internalshelp(ui): | |
172 """Generate the index for the "internals" topic.""" | |
173 lines = [] | |
174 for names, header, doc in internalstable: | |
175 lines.append(' :%s: %s' % (names[0], header)) | |
176 | |
177 return '\n'.join(lines) | |
178 | |
164 helptable = sorted([ | 179 helptable = sorted([ |
165 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), | 180 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), |
166 (["dates"], _("Date Formats"), loaddoc('dates')), | 181 (["dates"], _("Date Formats"), loaddoc('dates')), |
167 (["patterns"], _("File Name Patterns"), loaddoc('patterns')), | 182 (["patterns"], _("File Name Patterns"), loaddoc('patterns')), |
168 (['environment', 'env'], _('Environment Variables'), | 183 (['environment', 'env'], _('Environment Variables'), |
185 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"), | 200 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"), |
186 loaddoc('hgignore')), | 201 loaddoc('hgignore')), |
187 (["phases"], _("Working with Phases"), loaddoc('phases')), | 202 (["phases"], _("Working with Phases"), loaddoc('phases')), |
188 (['scripting'], _('Using Mercurial from scripts and automation'), | 203 (['scripting'], _('Using Mercurial from scripts and automation'), |
189 loaddoc('scripting')), | 204 loaddoc('scripting')), |
205 (['internals'], _("Technical implementation topics"), | |
206 internalshelp), | |
190 ]) | 207 ]) |
191 | 208 |
192 # Map topics to lists of callable taking the current topic help and | 209 # Map topics to lists of callable taking the current topic help and |
193 # returning the updated version | 210 # returning the updated version |
194 helphooks = {} | 211 helphooks = {} |