Mercurial > public > mercurial-scm > hg
diff mercurial/ui.py @ 30618:201b44c8875c
ui: do not translate empty configsource() to 'none' (API)
It should be processed when displaying data, so we can get "source": "" in
JSON output.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 23 Oct 2016 17:47:00 +0900 |
parents | bcb858396233 |
children | 344e68882cd3 |
line wrap: on
line diff
--- a/mercurial/ui.py Sun Dec 18 16:20:04 2016 +0900 +++ b/mercurial/ui.py Sun Oct 23 17:47:00 2016 +0900 @@ -249,8 +249,9 @@ if not p: continue if '%%' in p: + s = self.configsource('paths', n) or 'none' self.warn(_("(deprecated '%%' in path %s=%s from %s)\n") - % (n, p, self.configsource('paths', n))) + % (n, p, s)) p = p.replace('%%', '%') p = util.expandpath(p) if not util.hasscheme(p) and not os.path.isabs(p): @@ -291,7 +292,7 @@ return untrusted and self._ucfg or self._tcfg def configsource(self, section, name, untrusted=False): - return self._data(untrusted).source(section, name) or 'none' + return self._data(untrusted).source(section, name) def config(self, section, name, default=None, untrusted=False): if isinstance(name, list):