Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/hgwebdir_mod.py @ 20790:49f2d5644f04
config: set a 'source' in most cases where config don't come from file but code
Some extensions set configuration settings that showed up in 'hg showconfig
--debug' with 'none' as source. That was confusing.
Instead, they will now tell which extension they come from.
This change tries to be consistent and specify a source everywhere - also where
it perhaps is less relevant.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 19 Mar 2014 02:45:14 +0100 |
parents | 0e757575aef5 |
children | af62f0280a76 |
comparison
equal
deleted
inserted
replaced
20789:d19c9bdbbf35 | 20790:49f2d5644f04 |
---|---|
94 | 94 |
95 if self.baseui: | 95 if self.baseui: |
96 u = self.baseui.copy() | 96 u = self.baseui.copy() |
97 else: | 97 else: |
98 u = ui.ui() | 98 u = ui.ui() |
99 u.setconfig('ui', 'report_untrusted', 'off') | 99 u.setconfig('ui', 'report_untrusted', 'off', 'hgwebdir') |
100 u.setconfig('ui', 'nontty', 'true') | 100 u.setconfig('ui', 'nontty', 'true', 'hgwebdir') |
101 | 101 |
102 if not isinstance(self.conf, (dict, list, tuple)): | 102 if not isinstance(self.conf, (dict, list, tuple)): |
103 map = {'paths': 'hgweb-paths'} | 103 map = {'paths': 'hgweb-paths'} |
104 if not os.path.exists(self.conf): | 104 if not os.path.exists(self.conf): |
105 raise util.Abort(_('config file %s not found!') % self.conf) | 105 raise util.Abort(_('config file %s not found!') % self.conf) |