diff mercurial/dispatch.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 e0eae93e6c67
line wrap: on
line diff
--- a/mercurial/dispatch.py	Sat Oct 17 15:40:34 2009 +0200
+++ b/mercurial/dispatch.py	Mon Oct 19 22:19:28 2009 +0300
@@ -248,7 +248,7 @@
         args = aliasargs(i[0]) + args
         defaults = ui.config("defaults", cmd)
         if defaults:
-            args = shlex.split(defaults) + args
+            args = map(util.expandpath, shlex.split(defaults)) + args
         c = list(i[1])
     else:
         cmd = None
@@ -477,8 +477,7 @@
         output = ui.config('profiling', 'output')
 
         if output:
-            path = os.path.expanduser(output)
-            path = ui.expandpath(path)
+            path = ui.expandpath(output)
             ostream = open(path, 'wb')
         else:
             ostream = sys.stderr