Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.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 | ceb0f59e1327 |
children | 16698d87ad20 |
line wrap: on
line diff
--- a/mercurial/util.py Sat Oct 17 15:40:34 2009 +0200 +++ b/mercurial/util.py Mon Oct 19 22:19:28 2009 +0300 @@ -1158,6 +1158,7 @@ _rcpath = [] for p in os.environ['HGRCPATH'].split(os.pathsep): if not p: continue + p = expandpath(p) if os.path.isdir(p): for f, kind in osutil.listdir(p): if f.endswith('.rc'): @@ -1250,3 +1251,6 @@ for chunk in iterator: for line in chunk.splitlines(): yield line + +def expandpath(path): + return os.path.expanduser(os.path.expandvars(path))