mercurial/ui.py
changeset 30623 201b44c8875c
parent 30574 bcb858396233
child 30642 344e68882cd3
--- 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):