Mercurial > hg
changeset 32966:61a8321c9962
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 17 Jun 2017 18:28:20 +0200 |
parents | 36e16797df32 |
children | cd2fd1765654 |
files | mercurial/ui.py |
diffstat | 1 files changed, 1 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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):