##// 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 def showtopic(ui, topic):
139 def showtopic(ui, topic):
140 extrahelptable = [
140 extrahelptable = [
141 (["common"], '', loaddoc('common')),
141 (["common"], '', loaddoc('common'), help.TOPIC_CATEGORY_MISC),
142 (["hg.1"], '', loaddoc('hg.1')),
142 (["hg.1"], '', loaddoc('hg.1'), help.TOPIC_CATEGORY_CONFIG),
143 (["hg-ssh.8"], '', loaddoc('hg-ssh.8')),
143 (["hg-ssh.8"], '', loaddoc('hg-ssh.8'), help.TOPIC_CATEGORY_CONFIG),
144 (["hgignore.5"], '', loaddoc('hgignore.5')),
144 (["hgignore.5"], '', loaddoc('hgignore.5'), help.TOPIC_CATEGORY_CONFIG),
145 (["hgrc.5"], '', loaddoc('hgrc.5')),
145 (["hgrc.5"], '', loaddoc('hgrc.5'), help.TOPIC_CATEGORY_CONFIG),
146 (["hgignore.5.gendoc"], '', loaddoc('hgignore')),
146 (["hgignore.5.gendoc"], '', loaddoc('hgignore'),
147 (["hgrc.5.gendoc"], '', loaddoc('config')),
147 help.TOPIC_CATEGORY_CONFIG),
148 (["hgrc.5.gendoc"], '', loaddoc('config'), help.TOPIC_CATEGORY_CONFIG),
148 ]
149 ]
149 helpprinter(ui, helptable + extrahelptable, None, include=[topic])
150 helpprinter(ui, helptable + extrahelptable, None, include=[topic])
150
151
@@ -89,6 +89,11 b' CATEGORY_NAMES = {'
89 }
89 }
90
90
91 # Topic categories.
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 TOPIC_CATEGORY_NONE = 'none'
97 TOPIC_CATEGORY_NONE = 'none'
93
98
94 # The order in which topic categories will be displayed.
99 # The order in which topic categories will be displayed.
@@ -96,11 +101,22 b" TOPIC_CATEGORY_NONE = 'none'"
96 # after/before the appropriate item, rather than replacing the list or
101 # after/before the appropriate item, rather than replacing the list or
97 # assuming absolute positions.
102 # assuming absolute positions.
98 TOPIC_CATEGORY_ORDER = [
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 TOPIC_CATEGORY_NONE,
109 TOPIC_CATEGORY_NONE,
100 ]
110 ]
101
111
102 # Human-readable topic category names. These are translated.
112 # Human-readable topic category names. These are translated.
103 TOPIC_CATEGORY_NAMES = {
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 TOPIC_CATEGORY_NONE: 'Uncategorized topics',
120 TOPIC_CATEGORY_NONE: 'Uncategorized topics',
105 }
121 }
106
122
@@ -293,36 +309,47 b' def internalshelp(ui):'
293 return ''.join(lines)
309 return ''.join(lines)
294
310
295 helptable = sorted([
311 helptable = sorted([
296 (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec')),
312 (['bundlespec'], _("Bundle File Formats"), loaddoc('bundlespec'),
297 (['color'], _("Colorizing Outputs"), loaddoc('color')),
313 TOPIC_CATEGORY_CONCEPTS),
298 (["config", "hgrc"], _("Configuration Files"), loaddoc('config')),
314 (['color'], _("Colorizing Outputs"), loaddoc('color'),
299 (['deprecated'], _("Deprecated Features"), loaddoc('deprecated')),
315 TOPIC_CATEGORY_OUTPUT),
300 (["dates"], _("Date Formats"), loaddoc('dates')),
316 (["config", "hgrc"], _("Configuration Files"), loaddoc('config'),
301 (["flags"], _("Command-line flags"), loaddoc('flags')),
317 TOPIC_CATEGORY_CONFIG),
302 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
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 (['environment', 'env'], _('Environment Variables'),
325 (['environment', 'env'], _('Environment Variables'),
304 loaddoc('environment')),
326 loaddoc('environment'), TOPIC_CATEGORY_CONFIG),
305 (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'],
327 (['revisions', 'revs', 'revsets', 'revset', 'multirevs', 'mrevs'],
306 _('Specifying Revisions'), loaddoc('revisions')),
328 _('Specifying Revisions'), loaddoc('revisions'), TOPIC_CATEGORY_IDS),
307 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets')),
329 (['filesets', 'fileset'], _("Specifying File Sets"), loaddoc('filesets'),
308 (['diffs'], _('Diff Formats'), loaddoc('diffs')),
330 TOPIC_CATEGORY_IDS),
331 (['diffs'], _('Diff Formats'), loaddoc('diffs'), TOPIC_CATEGORY_OUTPUT),
309 (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'),
332 (['merge-tools', 'mergetools', 'mergetool'], _('Merge Tools'),
310 loaddoc('merge-tools')),
333 loaddoc('merge-tools'), TOPIC_CATEGORY_CONFIG),
311 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
334 (['templating', 'templates', 'template', 'style'], _('Template Usage'),
312 loaddoc('templates')),
335 loaddoc('templates'), TOPIC_CATEGORY_OUTPUT),
313 (['urls'], _('URL Paths'), loaddoc('urls')),
336 (['urls'], _('URL Paths'), loaddoc('urls'), TOPIC_CATEGORY_IDS),
314 (["extensions"], _("Using Additional Features"), extshelp),
337 (["extensions"], _("Using Additional Features"), extshelp,
315 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos')),
338 TOPIC_CATEGORY_CONFIG),
316 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')),
339 (["subrepos", "subrepo"], _("Subrepositories"), loaddoc('subrepos'),
317 (["glossary"], _("Glossary"), loaddoc('glossary')),
340 TOPIC_CATEGORY_CONCEPTS),
341 (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb'),
342 TOPIC_CATEGORY_CONFIG),
343 (["glossary"], _("Glossary"), loaddoc('glossary'), TOPIC_CATEGORY_CONCEPTS),
318 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
344 (["hgignore", "ignore"], _("Syntax for Mercurial Ignore Files"),
319 loaddoc('hgignore')),
345 loaddoc('hgignore'), TOPIC_CATEGORY_IDS),
320 (["phases"], _("Working with Phases"), loaddoc('phases')),
346 (["phases"], _("Working with Phases"), loaddoc('phases'),
347 TOPIC_CATEGORY_CONCEPTS),
321 (['scripting'], _('Using Mercurial from scripts and automation'),
348 (['scripting'], _('Using Mercurial from scripts and automation'),
322 loaddoc('scripting')),
349 loaddoc('scripting'), TOPIC_CATEGORY_MISC),
323 (['internals'], _("Technical implementation topics"),
350 (['internals'], _("Technical implementation topics"), internalshelp,
324 internalshelp),
351 TOPIC_CATEGORY_MISC),
325 (['pager'], _("Pager Support"), loaddoc('pager')),
352 (['pager'], _("Pager Support"), loaddoc('pager'), TOPIC_CATEGORY_CONFIG),
326 ])
353 ])
327
354
328 # Maps topics with sub-topics to a list of their sub-topics.
355 # Maps topics with sub-topics to a list of their sub-topics.
@@ -382,29 +382,43 b' Testing -h/--help:'
382
382
383 additional help topics:
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 color Colorizing Outputs
395 color Colorizing Outputs
396 dates Date Formats
397 diffs Diff Formats
398 templating Template Usage
399
400 Mercurial configuration:
401
387 config Configuration Files
402 config Configuration Files
388 dates Date Formats
389 deprecated Deprecated Features
390 diffs Diff Formats
391 environment Environment Variables
403 environment Environment Variables
392 extensions Using Additional Features
404 extensions Using Additional Features
393 filesets Specifying File Sets
394 flags Command-line flags
405 flags Command-line flags
395 glossary Glossary
396 hgignore Syntax for Mercurial Ignore Files
397 hgweb Configuring hgweb
406 hgweb Configuring hgweb
398 internals Technical implementation topics
399 merge-tools Merge Tools
407 merge-tools Merge Tools
400 pager Pager Support
408 pager Pager Support
401 patterns File Name Patterns
409
410 Concepts:
411
412 bundlespec Bundle File Formats
413 glossary Glossary
402 phases Working with Phases
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 scripting Using Mercurial from scripts and automation
421 scripting Using Mercurial from scripts and automation
405 subrepos Subrepositories
406 templating Template Usage
407 urls URL Paths
408
422
409 (use 'hg help -v' to show built-in aliases and global options)
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 additional help topics:
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 color Colorizing Outputs
525 color Colorizing Outputs
526 dates Date Formats
527 diffs Diff Formats
528 templating Template Usage
529
530 Mercurial configuration:
531
503 config Configuration Files
532 config Configuration Files
504 dates Date Formats
505 deprecated Deprecated Features
506 diffs Diff Formats
507 environment Environment Variables
533 environment Environment Variables
508 extensions Using Additional Features
534 extensions Using Additional Features
509 filesets Specifying File Sets
510 flags Command-line flags
535 flags Command-line flags
511 glossary Glossary
512 hgignore Syntax for Mercurial Ignore Files
513 hgweb Configuring hgweb
536 hgweb Configuring hgweb
514 internals Technical implementation topics
515 merge-tools Merge Tools
537 merge-tools Merge Tools
516 pager Pager Support
538 pager Pager Support
517 patterns File Name Patterns
539
540 Concepts:
541
542 bundlespec Bundle File Formats
543 glossary Glossary
518 phases Working with Phases
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 scripting Using Mercurial from scripts and automation
551 scripting Using Mercurial from scripts and automation
521 subrepos Subrepositories
522 templating Template Usage
523 urls URL Paths
524
552
525 (use 'hg help -v' to show built-in aliases and global options)
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 additional help topics:
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 color Colorizing Outputs
151 color Colorizing Outputs
152 dates Date Formats
153 diffs Diff Formats
154 templating Template Usage
155
156 Mercurial configuration:
157
143 config Configuration Files
158 config Configuration Files
144 dates Date Formats
145 deprecated Deprecated Features
146 diffs Diff Formats
147 environment Environment Variables
159 environment Environment Variables
148 extensions Using Additional Features
160 extensions Using Additional Features
149 filesets Specifying File Sets
150 flags Command-line flags
161 flags Command-line flags
151 glossary Glossary
152 hgignore Syntax for Mercurial Ignore Files
153 hgweb Configuring hgweb
162 hgweb Configuring hgweb
154 internals Technical implementation topics
155 merge-tools Merge Tools
163 merge-tools Merge Tools
156 pager Pager Support
164 pager Pager Support
157 patterns File Name Patterns
165
166 Concepts:
167
168 bundlespec Bundle File Formats
169 glossary Glossary
158 phases Working with Phases
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 scripting Using Mercurial from scripts and automation
177 scripting Using Mercurial from scripts and automation
161 subrepos Subrepositories
162 templating Template Usage
163 urls URL Paths
164
178
165 (use 'hg help -v' to show built-in aliases and global options)
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 additional help topics:
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 color Colorizing Outputs
277 color Colorizing Outputs
278 dates Date Formats
279 diffs Diff Formats
280 templating Template Usage
281
282 Mercurial configuration:
283
255 config Configuration Files
284 config Configuration Files
256 dates Date Formats
257 deprecated Deprecated Features
258 diffs Diff Formats
259 environment Environment Variables
285 environment Environment Variables
260 extensions Using Additional Features
286 extensions Using Additional Features
261 filesets Specifying File Sets
262 flags Command-line flags
287 flags Command-line flags
263 glossary Glossary
264 hgignore Syntax for Mercurial Ignore Files
265 hgweb Configuring hgweb
288 hgweb Configuring hgweb
266 internals Technical implementation topics
267 merge-tools Merge Tools
289 merge-tools Merge Tools
268 pager Pager Support
290 pager Pager Support
269 patterns File Name Patterns
291
292 Concepts:
293
294 bundlespec Bundle File Formats
295 glossary Glossary
270 phases Working with Phases
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 scripting Using Mercurial from scripts and automation
303 scripting Using Mercurial from scripts and automation
273 subrepos Subrepositories
274 templating Template Usage
275 urls URL Paths
276
304
277 Test extension help:
305 Test extension help:
278 $ hg help extensions --config extensions.rebase= --config extensions.children=
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 additional help topics:
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 color Colorizing Outputs
1004 color Colorizing Outputs
1005 dates Date Formats
1006 diffs Diff Formats
1007 templating Template Usage
1008
1009 Mercurial configuration:
1010
968 config Configuration Files
1011 config Configuration Files
969 dates Date Formats
970 deprecated Deprecated Features
971 diffs Diff Formats
972 environment Environment Variables
1012 environment Environment Variables
973 extensions Using Additional Features
1013 extensions Using Additional Features
974 filesets Specifying File Sets
975 flags Command-line flags
1014 flags Command-line flags
976 glossary Glossary
977 hgignore Syntax for Mercurial Ignore Files
978 hgweb Configuring hgweb
1015 hgweb Configuring hgweb
979 internals Technical implementation topics
980 merge-tools Merge Tools
1016 merge-tools Merge Tools
981 pager Pager Support
1017 pager Pager Support
982 patterns File Name Patterns
1018
1019 Concepts:
1020
1021 bundlespec Bundle File Formats
1022 glossary Glossary
983 phases Working with Phases
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 scripting Using Mercurial from scripts and automation
1030 scripting Using Mercurial from scripts and automation
986 subrepos Subrepositories
987 templating Template Usage
988 urls URL Paths
989
1031
990 (use 'hg help -v' to show built-in aliases and global options)
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