Mercurial > public > mercurial-scm > hg
comparison mercurial/help.py @ 40293:c303d65d2e34
help: assigning categories to existing commands
I'm separating this into its own commit so people can bikeshed over the actual
categorization (vs the support for categories). These categories are based on
the help implementation we've been using internally at Google, and have had
zero complaints.
Differential Revision: https://phab.mercurial-scm.org/D5067
author | rdamazio@google.com |
---|---|
date | Sat, 13 Oct 2018 02:17:41 -0700 |
parents | 9c6473d2038b |
children | fabbf9310025 |
comparison
equal
deleted
inserted
replaced
40292:9c6473d2038b | 40293:c303d65d2e34 |
---|---|
51 # The order in which command categories will be displayed. | 51 # The order in which command categories will be displayed. |
52 # Extensions with custom categories should insert them into this list | 52 # Extensions with custom categories should insert them into this list |
53 # after/before the appropriate item, rather than replacing the list or | 53 # after/before the appropriate item, rather than replacing the list or |
54 # assuming absolute positions. | 54 # assuming absolute positions. |
55 CATEGORY_ORDER = [ | 55 CATEGORY_ORDER = [ |
56 registrar.command.CATEGORY_REPO_CREATION, | |
57 registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT, | |
58 registrar.command.CATEGORY_COMMITTING, | |
59 registrar.command.CATEGORY_CHANGE_MANAGEMENT, | |
60 registrar.command.CATEGORY_CHANGE_ORGANIZATION, | |
61 registrar.command.CATEGORY_FILE_CONTENTS, | |
62 registrar.command.CATEGORY_CHANGE_NAVIGATION , | |
63 registrar.command.CATEGORY_WORKING_DIRECTORY, | |
64 registrar.command.CATEGORY_IMPORT_EXPORT, | |
65 registrar.command.CATEGORY_MAINTENANCE, | |
66 registrar.command.CATEGORY_HELP, | |
67 registrar.command.CATEGORY_MISC, | |
56 registrar.command.CATEGORY_NONE, | 68 registrar.command.CATEGORY_NONE, |
57 ] | 69 ] |
58 | 70 |
59 # Human-readable category names. These are translated. | 71 # Human-readable category names. These are translated. |
60 # Extensions with custom categories should add their names here. | 72 # Extensions with custom categories should add their names here. |
61 CATEGORY_NAMES = { | 73 CATEGORY_NAMES = { |
74 registrar.command.CATEGORY_REPO_CREATION: 'Repository creation', | |
75 registrar.command.CATEGORY_REMOTE_REPO_MANAGEMENT: | |
76 'Remote repository management', | |
77 registrar.command.CATEGORY_COMMITTING: 'Change creation', | |
78 registrar.command.CATEGORY_CHANGE_NAVIGATION: 'Change navigation', | |
79 registrar.command.CATEGORY_CHANGE_MANAGEMENT: 'Change manipulation', | |
80 registrar.command.CATEGORY_CHANGE_ORGANIZATION: 'Change organization', | |
81 registrar.command.CATEGORY_WORKING_DIRECTORY: | |
82 'Working directory management', | |
83 registrar.command.CATEGORY_FILE_CONTENTS: 'File content management', | |
84 registrar.command.CATEGORY_IMPORT_EXPORT: 'Change import/export', | |
85 registrar.command.CATEGORY_MAINTENANCE: 'Repository maintenance', | |
86 registrar.command.CATEGORY_HELP: 'Help', | |
87 registrar.command.CATEGORY_MISC: 'Miscellaneous commands', | |
62 registrar.command.CATEGORY_NONE: 'Uncategorized commands', | 88 registrar.command.CATEGORY_NONE: 'Uncategorized commands', |
63 } | 89 } |
64 | 90 |
65 # Topic categories. | 91 # Topic categories. |
66 TOPIC_CATEGORY_NONE = 'none' | 92 TOPIC_CATEGORY_NONE = 'none' |