Show More
@@ -1498,7 +1498,7 b' def config(ui, repo, *values, **opts):' | |||
|
1498 | 1498 | |
|
1499 | 1499 | See :hg:`help config` for more information about config files. |
|
1500 | 1500 | |
|
1501 | Returns 0 on success. | |
|
1501 | Returns 0 on success, 1 if NAME does not exist. | |
|
1502 | 1502 | |
|
1503 | 1503 | """ |
|
1504 | 1504 | |
@@ -1551,6 +1551,7 b' def config(ui, repo, *values, **opts):' | |||
|
1551 | 1551 | items = [v for v in values if '.' in v] |
|
1552 | 1552 | if len(items) > 1 or items and sections: |
|
1553 | 1553 | raise util.Abort(_('only one config item permitted')) |
|
1554 | matched = False | |
|
1554 | 1555 | for section, name, value in ui.walkconfig(untrusted=untrusted): |
|
1555 | 1556 | value = str(value).replace('\n', '\\n') |
|
1556 | 1557 | sectname = section + '.' + name |
@@ -1560,14 +1561,20 b' def config(ui, repo, *values, **opts):' | |||
|
1560 | 1561 | ui.debug('%s: ' % |
|
1561 | 1562 | ui.configsource(section, name, untrusted)) |
|
1562 | 1563 | ui.write('%s=%s\n' % (sectname, value)) |
|
1564 | matched = True | |
|
1563 | 1565 | elif v == sectname: |
|
1564 | 1566 | ui.debug('%s: ' % |
|
1565 | 1567 | ui.configsource(section, name, untrusted)) |
|
1566 | 1568 | ui.write(value, '\n') |
|
1569 | matched = True | |
|
1567 | 1570 | else: |
|
1568 | 1571 | ui.debug('%s: ' % |
|
1569 | 1572 | ui.configsource(section, name, untrusted)) |
|
1570 | 1573 | ui.write('%s=%s\n' % (sectname, value)) |
|
1574 | matched = True | |
|
1575 | if matched: | |
|
1576 | return 0 | |
|
1577 | return 1 | |
|
1571 | 1578 | |
|
1572 | 1579 | @command('copy|cp', |
|
1573 | 1580 | [('A', 'after', None, _('record a copy that has already occurred')), |
General Comments 0
You need to be logged in to leave comments.
Login now