Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.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 | d4f804caa0ed |
children | c7d543eebe1a |
line wrap: on
line diff
--- a/mercurial/subrepo.py Wed Mar 19 02:45:14 2014 +0100 +++ b/mercurial/subrepo.py Wed Mar 19 02:45:14 2014 +0100 @@ -512,8 +512,8 @@ for s, k in [('ui', 'commitsubrepos')]: v = r.ui.config(s, k) if v: - self._repo.ui.setconfig(s, k, v) - self._repo.ui.setconfig('ui', '_usedassubrepo', 'True') + self._repo.ui.setconfig(s, k, v, 'subrepo') + self._repo.ui.setconfig('ui', '_usedassubrepo', 'True', 'subrepo') self._initrepo(r, state[0], create) def storeclean(self, path): @@ -594,7 +594,7 @@ def addpathconfig(key, value): if value: fp.write('%s = %s\n' % (key, value)) - self._repo.ui.setconfig('paths', key, value) + self._repo.ui.setconfig('paths', key, value, 'subrepo') defpath = _abssource(self._repo, abort=False) defpushpath = _abssource(self._repo, True, abort=False)