Show More
@@ -703,6 +703,10 b" coreconfigitem('help', 'hidden-command\\." | |||||
703 | default=False, |
|
703 | default=False, | |
704 | generic=True, |
|
704 | generic=True, | |
705 | ) |
|
705 | ) | |
|
706 | coreconfigitem('help', 'hidden-topic\..*', | |||
|
707 | default=False, | |||
|
708 | generic=True, | |||
|
709 | ) | |||
706 | coreconfigitem('hooks', '.*', |
|
710 | coreconfigitem('hooks', '.*', | |
707 | default=dynamicdefault, |
|
711 | default=dynamicdefault, | |
708 | generic=True, |
|
712 | generic=True, |
@@ -198,6 +198,9 b' def filtercmd(ui, cmd, kw, doc):' | |||||
198 | return True |
|
198 | return True | |
199 | return False |
|
199 | return False | |
200 |
|
200 | |||
|
201 | def filtertopic(ui, topic): | |||
|
202 | return ui.configbool('help', 'hidden-topic.%s' % topic, False) | |||
|
203 | ||||
201 | def topicmatch(ui, commands, kw): |
|
204 | def topicmatch(ui, commands, kw): | |
202 | """Return help topics matching kw. |
|
205 | """Return help topics matching kw. | |
203 |
|
206 | |||
@@ -218,7 +221,9 b' def topicmatch(ui, commands, kw):' | |||||
218 | if (sum(map(lowercontains, names)) |
|
221 | if (sum(map(lowercontains, names)) | |
219 | or lowercontains(header) |
|
222 | or lowercontains(header) | |
220 | or (callable(doc) and lowercontains(doc(ui)))): |
|
223 | or (callable(doc) and lowercontains(doc(ui)))): | |
221 | results['topics'].append((names[0], header)) |
|
224 | name = names[0] | |
|
225 | if not filtertopic(ui, name): | |||
|
226 | results['topics'].append((names[0], header)) | |||
222 | for cmd, entry in commands.table.iteritems(): |
|
227 | for cmd, entry in commands.table.iteritems(): | |
223 | if len(entry) == 3: |
|
228 | if len(entry) == 3: | |
224 | summary = entry[2] |
|
229 | summary = entry[2] | |
@@ -599,7 +604,10 b' def help_(ui, commands, name, unknowncmd' | |||||
599 | else: |
|
604 | else: | |
600 | category = TOPIC_CATEGORY_NONE |
|
605 | category = TOPIC_CATEGORY_NONE | |
601 |
|
606 | |||
602 | topiccats.setdefault(category, []).append((names[0], header)) |
|
607 | topicname = names[0] | |
|
608 | if not filtertopic(ui, topicname): | |||
|
609 | topiccats.setdefault(category, []).append( | |||
|
610 | (topicname, header)) | |||
603 |
|
611 | |||
604 | # Check that all categories have an order. |
|
612 | # Check that all categories have an order. | |
605 | missing_order = set(topiccats.keys()) - set(TOPIC_CATEGORY_ORDER) |
|
613 | missing_order = set(topiccats.keys()) - set(TOPIC_CATEGORY_ORDER) |
@@ -125,3 +125,131 b' Test hiding some commands (which also ha' | |||||
125 | scripting Using Mercurial from scripts and automation |
|
125 | scripting Using Mercurial from scripts and automation | |
126 |
|
126 | |||
127 | (use 'hg help -v' to show built-in aliases and global options) |
|
127 | (use 'hg help -v' to show built-in aliases and global options) | |
|
128 | ||||
|
129 | Test hiding some topics. | |||
|
130 | ||||
|
131 | $ hg --config help.hidden-topic.deprecated=true \ | |||
|
132 | > --config help.hidden-topic.internals=true \ | |||
|
133 | > --config help.hidden-topic.scripting=true help | |||
|
134 | Mercurial Distributed SCM | |||
|
135 | ||||
|
136 | list of commands: | |||
|
137 | ||||
|
138 | Repository creation: | |||
|
139 | ||||
|
140 | clone make a copy of an existing repository | |||
|
141 | init create a new repository in the given directory | |||
|
142 | ||||
|
143 | Remote repository management: | |||
|
144 | ||||
|
145 | incoming show new changesets found in source | |||
|
146 | outgoing show changesets not found in the destination | |||
|
147 | paths show aliases for remote repositories | |||
|
148 | pull pull changes from the specified source | |||
|
149 | push push changes to the specified destination | |||
|
150 | serve start stand-alone webserver | |||
|
151 | ||||
|
152 | Change creation: | |||
|
153 | ||||
|
154 | commit commit the specified files or all outstanding changes | |||
|
155 | ||||
|
156 | Change manipulation: | |||
|
157 | ||||
|
158 | backout reverse effect of earlier changeset | |||
|
159 | graft copy changes from other branches onto the current branch | |||
|
160 | merge merge another revision into working directory | |||
|
161 | ||||
|
162 | Change organization: | |||
|
163 | ||||
|
164 | bookmarks create a new bookmark or list existing bookmarks | |||
|
165 | branch set or show the current branch name | |||
|
166 | branches list repository named branches | |||
|
167 | phase set or show the current phase name | |||
|
168 | tag add one or more tags for the current or given revision | |||
|
169 | tags list repository tags | |||
|
170 | ||||
|
171 | File content management: | |||
|
172 | ||||
|
173 | annotate show changeset information by line for each file | |||
|
174 | cat output the current or given revision of files | |||
|
175 | copy mark files as copied for the next commit | |||
|
176 | diff diff repository (or selected files) | |||
|
177 | grep search revision history for a pattern in specified files | |||
|
178 | ||||
|
179 | Change navigation: | |||
|
180 | ||||
|
181 | bisect subdivision search of changesets | |||
|
182 | heads show branch heads | |||
|
183 | identify identify the working directory or specified revision | |||
|
184 | log show revision history of entire repository or files | |||
|
185 | ||||
|
186 | Working directory management: | |||
|
187 | ||||
|
188 | add add the specified files on the next commit | |||
|
189 | addremove add all new files, delete all missing files | |||
|
190 | files list tracked files | |||
|
191 | forget forget the specified files on the next commit | |||
|
192 | remove remove the specified files on the next commit | |||
|
193 | rename rename files; equivalent of copy + remove | |||
|
194 | resolve redo merges or set/view the merge status of files | |||
|
195 | revert restore files to their checkout state | |||
|
196 | root print the root (top) of the current working directory | |||
|
197 | status show changed files in the working directory | |||
|
198 | summary summarize working directory state | |||
|
199 | update update working directory (or switch revisions) | |||
|
200 | ||||
|
201 | Change import/export: | |||
|
202 | ||||
|
203 | archive create an unversioned archive of a repository revision | |||
|
204 | bundle create a bundle file | |||
|
205 | export dump the header and diffs for one or more changesets | |||
|
206 | import import an ordered set of patches | |||
|
207 | unbundle apply one or more bundle files | |||
|
208 | ||||
|
209 | Repository maintenance: | |||
|
210 | ||||
|
211 | manifest output the current or given revision of the project manifest | |||
|
212 | recover roll back an interrupted transaction | |||
|
213 | verify verify the integrity of the repository | |||
|
214 | ||||
|
215 | Help: | |||
|
216 | ||||
|
217 | config show combined config settings from all hgrc files | |||
|
218 | help show help for a given topic or a help overview | |||
|
219 | version output version and copyright information | |||
|
220 | ||||
|
221 | additional help topics: | |||
|
222 | ||||
|
223 | Mercurial identifiers: | |||
|
224 | ||||
|
225 | filesets Specifying File Sets | |||
|
226 | hgignore Syntax for Mercurial Ignore Files | |||
|
227 | patterns File Name Patterns | |||
|
228 | revisions Specifying Revisions | |||
|
229 | urls URL Paths | |||
|
230 | ||||
|
231 | Mercurial output: | |||
|
232 | ||||
|
233 | color Colorizing Outputs | |||
|
234 | dates Date Formats | |||
|
235 | diffs Diff Formats | |||
|
236 | templating Template Usage | |||
|
237 | ||||
|
238 | Mercurial configuration: | |||
|
239 | ||||
|
240 | config Configuration Files | |||
|
241 | environment Environment Variables | |||
|
242 | extensions Using Additional Features | |||
|
243 | flags Command-line flags | |||
|
244 | hgweb Configuring hgweb | |||
|
245 | merge-tools Merge Tools | |||
|
246 | pager Pager Support | |||
|
247 | ||||
|
248 | Concepts: | |||
|
249 | ||||
|
250 | bundlespec Bundle File Formats | |||
|
251 | glossary Glossary | |||
|
252 | phases Working with Phases | |||
|
253 | subrepos Subrepositories | |||
|
254 | ||||
|
255 | (use 'hg help -v' to show built-in aliases and global options) |
General Comments 0
You need to be logged in to leave comments.
Login now