Show More
@@ -1462,8 +1462,10 b' def commit(ui, repo, *pats, **opts):' | |||
|
1462 | 1462 | |
|
1463 | 1463 | @command('config|showconfig|debugconfig', |
|
1464 | 1464 | [('u', 'untrusted', None, _('show untrusted configuration options')), |
|
1465 |
('e', 'edit', None, _(' |
|
|
1466 | _('[-u] [NAME]...')) | |
|
1465 | ('e', 'edit', None, _('edit user config')), | |
|
1466 | ('l', 'local', None, _('edit repository config')), | |
|
1467 | ('g', 'global', None, _('edit global config'))], | |
|
1468 | _('[-u] [NAME]...')) | |
|
1467 | 1469 | def config(ui, repo, *values, **opts): |
|
1468 | 1470 | """show combined config settings from all hgrc files |
|
1469 | 1471 | |
@@ -1481,8 +1483,19 b' def config(ui, repo, *values, **opts):' | |||
|
1481 | 1483 | Returns 0 on success. |
|
1482 | 1484 | """ |
|
1483 | 1485 | |
|
1484 | if opts.get('edit'): | |
|
1485 | paths = scmutil.userrcpath() | |
|
1486 | if opts.get('edit') or opts.get('local') or opts.get('global'): | |
|
1487 | if opts.get('local') and opts.get('global'): | |
|
1488 | raise util.Abort(_("can't use --local and --global together")) | |
|
1489 | ||
|
1490 | if opts.get('local'): | |
|
1491 | if not repo: | |
|
1492 | raise util.Abort(_("can't use --local outside a repository")) | |
|
1493 | paths = [repo.join('hgrc')] | |
|
1494 | elif opts.get('global'): | |
|
1495 | paths = scmutil.systemrcpath() | |
|
1496 | else: | |
|
1497 | paths = scmutil.userrcpath() | |
|
1498 | ||
|
1486 | 1499 | for f in paths: |
|
1487 | 1500 | if os.path.exists(f): |
|
1488 | 1501 | break |
@@ -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, edit | |
|
225 | config: untrusted, edit, local, global | |
|
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