Show More
@@ -1462,7 +1462,8 b' def commit(ui, repo, *pats, **opts):' | |||
|
1462 | 1462 | cmdutil.commitstatus(repo, node, branch, bheads, opts) |
|
1463 | 1463 | |
|
1464 | 1464 | @command('config|showconfig|debugconfig', |
|
1465 |
[('u', 'untrusted', None, _('show untrusted configuration options')) |
|
|
1465 | [('u', 'untrusted', None, _('show untrusted configuration options')), | |
|
1466 | ('e', 'edit', None, _('start editor'))], | |
|
1466 | 1467 | _('[-u] [NAME]...')) |
|
1467 | 1468 | def config(ui, repo, *values, **opts): |
|
1468 | 1469 | """show combined config settings from all hgrc files |
@@ -1481,6 +1482,19 b' def config(ui, repo, *values, **opts):' | |||
|
1481 | 1482 | Returns 0 on success. |
|
1482 | 1483 | """ |
|
1483 | 1484 | |
|
1485 | if opts.get('edit'): | |
|
1486 | paths = scmutil.userrcpath() | |
|
1487 | for f in paths: | |
|
1488 | if os.path.exists(f): | |
|
1489 | break | |
|
1490 | else: | |
|
1491 | f = paths[0] | |
|
1492 | editor = ui.geteditor() | |
|
1493 | util.system("%s \"%s\"" % (editor, f), | |
|
1494 | onerr=util.Abort, errprefix=_("edit failed"), | |
|
1495 | out=ui.fout) | |
|
1496 | return | |
|
1497 | ||
|
1484 | 1498 | for f in scmutil.rcpath(): |
|
1485 | 1499 | ui.debug('read config from: %s\n' % f) |
|
1486 | 1500 | untrusted = bool(opts.get('untrusted')) |
@@ -222,7 +222,7 b' Show all commands + options' | |||
|
222 | 222 | branches: active, closed |
|
223 | 223 | bundle: force, rev, branch, base, all, type, ssh, remotecmd, insecure |
|
224 | 224 | cat: output, rev, decode, include, exclude |
|
225 | config: untrusted | |
|
225 | config: untrusted, edit | |
|
226 | 226 | copy: after, force, include, exclude, dry-run |
|
227 | 227 | debugancestor: |
|
228 | 228 | debugbuilddag: mergeable-file, overwritten-file, new-file |
General Comments 0
You need to be logged in to leave comments.
Login now