Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 9610:d78fe60f6bda
make path expanding more consistent
This expands ~user and $FOO constructs in ui.ignore files, [defaults],
[paths], extension paths, and HGRCPATH files.
author | Alexander Solovyov <piranha@piranha.org.ua> |
---|---|
date | Mon, 19 Oct 2009 22:19:28 +0300 |
parents | 96379c93ba6f |
children | c63c336ee2f7 |
line wrap: on
line diff
--- a/mercurial/ui.py Sat Oct 17 15:40:34 2009 +0200 +++ b/mercurial/ui.py Mon Oct 19 22:19:28 2009 +0300 @@ -198,10 +198,12 @@ def _path(self, loc): p = self.config('paths', loc) - if p and '%%' in p: - self.warn("(deprecated '%%' in path %s=%s from %s)\n" % - (loc, p, self.configsource('paths', loc))) - p = p.replace('%%', '%') + if p: + if '%%' in p: + self.warn("(deprecated '%%' in path %s=%s from %s)\n" % + (loc, p, self.configsource('paths', loc))) + p = p.replace('%%', '%') + p = util.expandpath(p) return p def expandpath(self, loc, default=None):