##// END OF EJS Templates
help: assigning topic categories...
Rodrigo Damazio -
r40330:fabbf931 default
parent child Browse files
Show More
@@ -138,13 +138,14 b' def showdoc(ui):'
138 138
139 139 def showtopic(ui, topic):
140 140 extrahelptable = [
141 (["common"], '', loaddoc('common')),
142 (["hg.1"], '', loaddoc('hg.1')),
143 (["hg-ssh.8"], '', loaddoc('hg-ssh.8')),
144 (["hgignore.5"], '', loaddoc('hgignore.5')),
145 (["hgrc.5"], '', loaddoc('hgrc.5')),
146 (["hgignore.5.gendoc"], '', loaddoc('hgignore')),
147 (["hgrc.5.gendoc"], '', loaddoc('config')),
141 (["common"], '', loaddoc('common'), help.TOPIC_CATEGORY_MISC),
142 (["hg.1"], '', loaddoc('hg.1'), help.TOPIC_CATEGORY_CONFIG),
143 (["hg-ssh.8"], '', loaddoc('hg-ssh.8'), help.TOPIC_CATEGORY_CONFIG),
144 (["hgignore.5"], '', loaddoc('hgignore.5'), help.TOPIC_CATEGORY_CONFIG),
145 (["hgrc.5"], '', loaddoc('hgrc.5'), help.TOPIC_CATEGORY_CONFIG),
146 (["hgignore.5.gendoc"], '', loaddoc('hgignore'),
147 help.TOPIC_CATEGORY_CONFIG),
148 (["hgrc.5.gendoc"], '', loaddoc('config'), help.TOPIC_CATEGORY_CONFIG),
148 149 ]
149 150 helpprinter(ui, helptable + extrahelptable, None, include=[topic])
150 151
@@ -89,6 +89,11 b' CATEGORY_NAMES = {'
89 89 }
90 90
91 91 # Topic categories.
92 TOPIC_CATEGORY_IDS = 'ids'
93 TOPIC_CATEGORY_OUTPUT = 'output'
94 TOPIC_CATEGORY_CONFIG = 'config'
95 TOPIC_CATEGORY_CONCEPTS = 'concepts'
96 TOPIC_CATEGORY_MISC = 'misc'
92 97 TOPIC_CATEGORY_NONE = 'none'
93 98
94 99 # The order in which topic categories will be displayed.
@@ -96,11 +101,22 b" TOPIC_CATEGORY_NONE = 'none'"
96 101 # after/before the appropriate item, rather than replacing the list or
97 102 # assuming absolute positions.
98 103 TOPIC_CATEGORY_ORDER = [
104 TOPIC_CATEGORY_IDS,
105 TOPIC_CATEGORY_OUTPUT,
106 TOPIC_CATEGORY_CONFIG,
107 TOPIC_CATEGORY_CONCEPTS,
108 TOPIC_CATEGORY_MISC,
99 109 TOPIC_CATEGORY_NONE,
100 110 ]
101 111
102 112 # Human-readable topic category names. These are translated.
103 113 TOPIC_CATEGORY_NAMES = {
114 TOPIC_CATEGORY_IDS: 'Mercurial identifiers',
115 TOPIC_CATEGORY_OUTPUT: 'Mercurial output',
116 TOPIC_CATEGORY_CONFIG: 'Mercurial configuration',
117 TOPIC_CATEGORY_CONCEPTS: 'Concepts',
118 TOPIC_CATEGORY_MISC: 'Miscellaneous',
119 TOPIC_CATEGORY_NONE: 'Uncategorized topics',
104 120 TOPIC_CATEGORY_NONE: 'Uncategorized topics',
105 121 }
106 122
@@ -293,36 +309,47 b' def internalshelp(ui):'
293 309 return ''.join(lines)
294 310
295 311 helptable = sorted([
296 (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec')),
297 (['color'], _("Colorizing Outputs"), loaddoc('color')),
298 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
299 (['deprecated'], _("Deprecated Features"), loaddoc('deprecated')),
300 (["dates"], _("Date Formats"), loaddoc('dates')),
301 (["flags"], _("Command-line flags"), loaddoc('flags')),
302 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
312 (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec'),
313 TOPIC_CATEGORY_CONCEPTS),
314 (['color'], _("Colorizing Outputs"), loaddoc('color'),
315 TOPIC_CATEGORY_OUTPUT),
316 (["config", "hgrc"], _("Configuration Files"), loaddoc('config'),
317 TOPIC_CATEGORY_CONFIG),
318 (['deprecated'], _("Deprecated Features"), loaddoc('deprecated'),
319 TOPIC_CATEGORY_MISC),
320 (["dates"], _("Date Formats"), loaddoc('dates'), TOPIC_CATEGORY_OUTPUT),
321 (["flags"], _("Command-line flags"), loaddoc('flags'),
322 TOPIC_CATEGORY_CONFIG),
323 (["patterns"], _("File Name Patterns"), loaddoc('patterns'),
324 TOPIC_CATEGORY_IDS),
303 325 (['environment', 'env'], _('Environment Variables'),
304 loaddoc('environment')),
326 loaddoc('environment'), TOPIC_CATEGORY_CONFIG),
305 327 (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'],
306 _('Specifying Revisions'), loaddoc('revisions')),
307 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
308 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
328 _('Specifying Revisions'), loaddoc('revisions'), TOPIC_CATEGORY_IDS),
329 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets'),
330 TOPIC_CATEGORY_IDS),
331 (['diffs'], _('Diff Formats'), loaddoc('diffs'), TOPIC_CATEGORY_OUTPUT),
309 332 (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'),
310 loaddoc('merge-tools')),
333 loaddoc('merge-tools'), TOPIC_CATEGORY_CONFIG),
311 334 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
312 loaddoc('templates')),
313 (['urls'], _('URL Paths'), loaddoc('urls')),
314 (["extensions"], _("Using Additional Features"), extshelp),
315 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
316 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
317 (["glossary"], _("Glossary"), loaddoc('glossary')),
335 loaddoc('templates'), TOPIC_CATEGORY_OUTPUT),
336 (['urls'], _('URL Paths'), loaddoc('urls'), TOPIC_CATEGORY_IDS),
337 (["extensions"], _("Using Additional Features"), extshelp,
338 TOPIC_CATEGORY_CONFIG),
339 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos'),
340 TOPIC_CATEGORY_CONCEPTS),
341 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb'),
342 TOPIC_CATEGORY_CONFIG),
343 (["glossary"], _("Glossary"), loaddoc('glossary'), TOPIC_CATEGORY_CONCEPTS),
318 344 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
319 loaddoc('hgignore')),
320 (["phases"], _("Working with Phases"), loaddoc('phases')),
345 loaddoc('hgignore'), TOPIC_CATEGORY_IDS),
346 (["phases"], _("Working with Phases"), loaddoc('phases'),
347 TOPIC_CATEGORY_CONCEPTS),
321 348 (['scripting'], _('Using Mercurial from scripts and automation'),
322 loaddoc('scripting')),
323 (['internals'], _("Technical implementation topics"),
324 internalshelp),
325 (['pager'], _("Pager Support"), loaddoc('pager')),
349 loaddoc('scripting'), TOPIC_CATEGORY_MISC),
350 (['internals'], _("Technical implementation topics"), internalshelp,
351 TOPIC_CATEGORY_MISC),
352 (['pager'], _("Pager Support"), loaddoc('pager'), TOPIC_CATEGORY_CONFIG),
326 353 ])
327 354
328 355 # Maps topics with sub-topics to a list of their sub-topics.
@@ -382,29 +382,43 b' Testing -h/--help:'
382 382
383 383 additional help topics:
384 384
385 bundlespec Bundle File Formats
385 Mercurial identifiers:
386
387 filesets Specifying File Sets
388 hgignore Syntax for Mercurial Ignore Files
389 patterns File Name Patterns
390 revisions Specifying Revisions
391 urls URL Paths
392
393 Mercurial output:
394
386 395 color Colorizing Outputs
396 dates Date Formats
397 diffs Diff Formats
398 templating Template Usage
399
400 Mercurial configuration:
401
387 402 config Configuration Files
388 dates Date Formats
389 deprecated Deprecated Features
390 diffs Diff Formats
391 403 environment Environment Variables
392 404 extensions Using Additional Features
393 filesets Specifying File Sets
394 405 flags Command-line flags
395 glossary Glossary
396 hgignore Syntax for Mercurial Ignore Files
397 406 hgweb Configuring hgweb
398 internals Technical implementation topics
399 407 merge-tools Merge Tools
400 408 pager Pager Support
401 patterns File Name Patterns
409
410 Concepts:
411
412 bundlespec Bundle File Formats
413 glossary Glossary
402 414 phases Working with Phases
403 revisions Specifying Revisions
415 subrepos Subrepositories
416
417 Miscellaneous:
418
419 deprecated Deprecated Features
420 internals Technical implementation topics
404 421 scripting Using Mercurial from scripts and automation
405 subrepos Subrepositories
406 templating Template Usage
407 urls URL Paths
408 422
409 423 (use 'hg help -v' to show built-in aliases and global options)
410 424
@@ -498,29 +512,43 b' Testing -h/--help:'
498 512
499 513 additional help topics:
500 514
501 bundlespec Bundle File Formats
515 Mercurial identifiers:
516
517 filesets Specifying File Sets
518 hgignore Syntax for Mercurial Ignore Files
519 patterns File Name Patterns
520 revisions Specifying Revisions
521 urls URL Paths
522
523 Mercurial output:
524
502 525 color Colorizing Outputs
526 dates Date Formats
527 diffs Diff Formats
528 templating Template Usage
529
530 Mercurial configuration:
531
503 532 config Configuration Files
504 dates Date Formats
505 deprecated Deprecated Features
506 diffs Diff Formats
507 533 environment Environment Variables
508 534 extensions Using Additional Features
509 filesets Specifying File Sets
510 535 flags Command-line flags
511 glossary Glossary
512 hgignore Syntax for Mercurial Ignore Files
513 536 hgweb Configuring hgweb
514 internals Technical implementation topics
515 537 merge-tools Merge Tools
516 538 pager Pager Support
517 patterns File Name Patterns
539
540 Concepts:
541
542 bundlespec Bundle File Formats
543 glossary Glossary
518 544 phases Working with Phases
519 revisions Specifying Revisions
545 subrepos Subrepositories
546
547 Miscellaneous:
548
549 deprecated Deprecated Features
550 internals Technical implementation topics
520 551 scripting Using Mercurial from scripts and automation
521 subrepos Subrepositories
522 templating Template Usage
523 urls URL Paths
524 552
525 553 (use 'hg help -v' to show built-in aliases and global options)
526 554
@@ -138,29 +138,43 b' the extension is unknown.'
138 138
139 139 additional help topics:
140 140
141 bundlespec Bundle File Formats
141 Mercurial identifiers:
142
143 filesets Specifying File Sets
144 hgignore Syntax for Mercurial Ignore Files
145 patterns File Name Patterns
146 revisions Specifying Revisions
147 urls URL Paths
148
149 Mercurial output:
150
142 151 color Colorizing Outputs
152 dates Date Formats
153 diffs Diff Formats
154 templating Template Usage
155
156 Mercurial configuration:
157
143 158 config Configuration Files
144 dates Date Formats
145 deprecated Deprecated Features
146 diffs Diff Formats
147 159 environment Environment Variables
148 160 extensions Using Additional Features
149 filesets Specifying File Sets
150 161 flags Command-line flags
151 glossary Glossary
152 hgignore Syntax for Mercurial Ignore Files
153 162 hgweb Configuring hgweb
154 internals Technical implementation topics
155 163 merge-tools Merge Tools
156 164 pager Pager Support
157 patterns File Name Patterns
165
166 Concepts:
167
168 bundlespec Bundle File Formats
169 glossary Glossary
158 170 phases Working with Phases
159 revisions Specifying Revisions
171 subrepos Subrepositories
172
173 Miscellaneous:
174
175 deprecated Deprecated Features
176 internals Technical implementation topics
160 177 scripting Using Mercurial from scripts and automation
161 subrepos Subrepositories
162 templating Template Usage
163 urls URL Paths
164 178
165 179 (use 'hg help -v' to show built-in aliases and global options)
166 180
@@ -250,29 +264,43 b' the extension is unknown.'
250 264
251 265 additional help topics:
252 266
253 bundlespec Bundle File Formats
267 Mercurial identifiers:
268
269 filesets Specifying File Sets
270 hgignore Syntax for Mercurial Ignore Files
271 patterns File Name Patterns
272 revisions Specifying Revisions
273 urls URL Paths
274
275 Mercurial output:
276
254 277 color Colorizing Outputs
278 dates Date Formats
279 diffs Diff Formats
280 templating Template Usage
281
282 Mercurial configuration:
283
255 284 config Configuration Files
256 dates Date Formats
257 deprecated Deprecated Features
258 diffs Diff Formats
259 285 environment Environment Variables
260 286 extensions Using Additional Features
261 filesets Specifying File Sets
262 287 flags Command-line flags
263 glossary Glossary
264 hgignore Syntax for Mercurial Ignore Files
265 288 hgweb Configuring hgweb
266 internals Technical implementation topics
267 289 merge-tools Merge Tools
268 290 pager Pager Support
269 patterns File Name Patterns
291
292 Concepts:
293
294 bundlespec Bundle File Formats
295 glossary Glossary
270 296 phases Working with Phases
271 revisions Specifying Revisions
297 subrepos Subrepositories
298
299 Miscellaneous:
300
301 deprecated Deprecated Features
302 internals Technical implementation topics
272 303 scripting Using Mercurial from scripts and automation
273 subrepos Subrepositories
274 templating Template Usage
275 urls URL Paths
276 304
277 305 Test extension help:
278 306 $ hg help extensions --config extensions.rebase= --config extensions.children=
@@ -963,29 +991,43 b' Test that default list of commands omits'
963 991
964 992 additional help topics:
965 993
966 bundlespec Bundle File Formats
994 Mercurial identifiers:
995
996 filesets Specifying File Sets
997 hgignore Syntax for Mercurial Ignore Files
998 patterns File Name Patterns
999 revisions Specifying Revisions
1000 urls URL Paths
1001
1002 Mercurial output:
1003
967 1004 color Colorizing Outputs
1005 dates Date Formats
1006 diffs Diff Formats
1007 templating Template Usage
1008
1009 Mercurial configuration:
1010
968 1011 config Configuration Files
969 dates Date Formats
970 deprecated Deprecated Features
971 diffs Diff Formats
972 1012 environment Environment Variables
973 1013 extensions Using Additional Features
974 filesets Specifying File Sets
975 1014 flags Command-line flags
976 glossary Glossary
977 hgignore Syntax for Mercurial Ignore Files
978 1015 hgweb Configuring hgweb
979 internals Technical implementation topics
980 1016 merge-tools Merge Tools
981 1017 pager Pager Support
982 patterns File Name Patterns
1018
1019 Concepts:
1020
1021 bundlespec Bundle File Formats
1022 glossary Glossary
983 1023 phases Working with Phases
984 revisions Specifying Revisions
1024 subrepos Subrepositories
1025
1026 Miscellaneous:
1027
1028 deprecated Deprecated Features
1029 internals Technical implementation topics
985 1030 scripting Using Mercurial from scripts and automation
986 subrepos Subrepositories
987 templating Template Usage
988 urls URL Paths
989 1031
990 1032 (use 'hg help -v' to show built-in aliases and global options)
991 1033
General Comments 0
You need to be logged in to leave comments. Login now