equal
deleted
inserted
replaced
14 ) |
14 ) |
15 |
15 |
16 def loadconfigtable(ui, extname, configtable): |
16 def loadconfigtable(ui, extname, configtable): |
17 """update config item known to the ui with the extension ones""" |
17 """update config item known to the ui with the extension ones""" |
18 for section, items in configtable.items(): |
18 for section, items in configtable.items(): |
19 ui._knownconfig.setdefault(section, {}).update(items) |
19 knownitems = ui._knownconfig.setdefault(section, {}) |
|
20 knownkeys = set(knownitems) |
|
21 newkeys = set(items) |
|
22 for key in sorted(knownkeys & newkeys): |
|
23 msg = "extension '%s' overwrite config item '%s.%s'" |
|
24 msg %= (extname, section, key) |
|
25 ui.develwarn(msg, config='warn-config') |
|
26 |
|
27 knownitems.update(items) |
20 |
28 |
21 class configitem(object): |
29 class configitem(object): |
22 """represent a known config item |
30 """represent a known config item |
23 |
31 |
24 :section: the official config section where to find this item, |
32 :section: the official config section where to find this item, |