config: use the 'config' method in 'configsuboptions'
There was unnecessary code duplication. It was getting in the way of the
unification of the default value logic.
--- a/mercurial/ui.py Sat Jun 17 12:52:02 2017 +0200
+++ b/mercurial/ui.py Sat Jun 17 18:28:20 2017 +0200
@@ -470,14 +470,8 @@
Returns a 2-tuple of ``(option, sub-options)``, where `sub-options``
is a dict of defined sub-options where keys and values are strings.
"""
+ main = self.config(section, name, default, untrusted=untrusted)
data = self._data(untrusted)
- main = data.get(section, name, default)
- if self.debugflag and not untrusted and self._reportuntrusted:
- uvalue = self._ucfg.get(section, name)
- if uvalue is not None and uvalue != main:
- self.debug('ignoring untrusted configuration option '
- '%s.%s = %s\n' % (section, name, uvalue))
-
sub = {}
prefix = '%s:' % name
for k, v in data.items(section):