Show More
@@ -4367,8 +4367,9 b' def heads(ui, repo, *branchrevs, **opts)' | |||||
4367 | [('e', 'extension', None, _('show only help for extensions')), |
|
4367 | [('e', 'extension', None, _('show only help for extensions')), | |
4368 | ('c', 'command', None, _('show only help for commands')), |
|
4368 | ('c', 'command', None, _('show only help for commands')), | |
4369 | ('k', 'keyword', None, _('show topics matching keyword')), |
|
4369 | ('k', 'keyword', None, _('show topics matching keyword')), | |
|
4370 | ('s', 'system', [], _('show help for specific platform(s)')), | |||
4370 | ], |
|
4371 | ], | |
4371 | _('[-eck] [TOPIC]'), |
|
4372 | _('[-ecks] [TOPIC]'), | |
4372 | norepo=True) |
|
4373 | norepo=True) | |
4373 | def help_(ui, name=None, **opts): |
|
4374 | def help_(ui, name=None, **opts): | |
4374 | """show help for a given topic or a help overview |
|
4375 | """show help for a given topic or a help overview | |
@@ -4383,18 +4384,19 b' def help_(ui, name=None, **opts):' | |||||
4383 |
|
4384 | |||
4384 | textwidth = min(ui.termwidth(), 80) - 2 |
|
4385 | textwidth = min(ui.termwidth(), 80) - 2 | |
4385 |
|
4386 | |||
4386 | keep = [] |
|
4387 | keep = opts.get('system') or [] | |
|
4388 | if len(keep) == 0: | |||
|
4389 | if sys.platform.startswith('win'): | |||
|
4390 | keep.append('windows') | |||
|
4391 | elif sys.platform == 'OpenVMS': | |||
|
4392 | keep.append('vms') | |||
|
4393 | elif sys.platform == 'plan9': | |||
|
4394 | keep.append('plan9') | |||
|
4395 | else: | |||
|
4396 | keep.append('unix') | |||
|
4397 | keep.append(sys.platform.lower()) | |||
4387 | if ui.verbose: |
|
4398 | if ui.verbose: | |
4388 | keep.append('verbose') |
|
4399 | keep.append('verbose') | |
4389 | if sys.platform.startswith('win'): |
|
|||
4390 | keep.append('windows') |
|
|||
4391 | elif sys.platform == 'OpenVMS': |
|
|||
4392 | keep.append('vms') |
|
|||
4393 | elif sys.platform == 'plan9': |
|
|||
4394 | keep.append('plan9') |
|
|||
4395 | else: |
|
|||
4396 | keep.append('unix') |
|
|||
4397 | keep.append(sys.platform.lower()) |
|
|||
4398 |
|
4400 | |||
4399 | section = None |
|
4401 | section = None | |
4400 | subtopic = None |
|
4402 | subtopic = None |
@@ -278,7 +278,7 b' Show all commands + options' | |||||
278 | graft: rev, continue, edit, log, force, currentdate, currentuser, date, user, tool, dry-run |
|
278 | graft: rev, continue, edit, log, force, currentdate, currentuser, date, user, tool, dry-run | |
279 | grep: print0, all, text, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude |
|
279 | grep: print0, all, text, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude | |
280 | heads: rev, topo, active, closed, style, template |
|
280 | heads: rev, topo, active, closed, style, template | |
281 | help: extension, command, keyword |
|
281 | help: extension, command, keyword, system | |
282 | identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure |
|
282 | identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure | |
283 | import: strip, base, edit, force, no-commit, bypass, partial, exact, prefix, import-branch, message, logfile, date, user, similarity |
|
283 | import: strip, base, edit, force, no-commit, bypass, partial, exact, prefix, import-branch, message, logfile, date, user, similarity | |
284 | incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos |
|
284 | incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos |
@@ -1250,6 +1250,15 b' help -c should only show deprecated for ' | |||||
1250 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' |
|
1250 | $ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$' | |
1251 | [1] |
|
1251 | [1] | |
1252 |
|
1252 | |||
|
1253 | Test -s / --system | |||
|
1254 | ||||
|
1255 | $ hg help config.files -s windows |grep 'etc/mercurial' | \ | |||
|
1256 | > wc -l | sed -e 's/ //g' | |||
|
1257 | 0 | |||
|
1258 | $ hg help config.files --system unix | grep 'USER' | \ | |||
|
1259 | > wc -l | sed -e 's/ //g' | |||
|
1260 | 0 | |||
|
1261 | ||||
1253 | Test -e / -c / -k combinations |
|
1262 | Test -e / -c / -k combinations | |
1254 |
|
1263 | |||
1255 | $ hg help -c|egrep '^[A-Z].*:|^ debug' |
|
1264 | $ hg help -c|egrep '^[A-Z].*:|^ debug' |
General Comments 0
You need to be logged in to leave comments.
Login now