Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.py @ 2284:d6392a7c03dd
On win98 os.path.expanuser('~') does not result in a useable directory.
The MSDN recommendation for user specific directories is the use of
shell.ShGetSpecialFolder, so use it.
For details see:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shgetspecialfolderpath.asp
author | Volker Kleinfeld <Volker.Kleinfeld@gmx.de> |
---|---|
date | Sun, 14 May 2006 23:44:50 -0700 |
parents | 09ed44225571 |
children | cb520d961d6a |
line wrap: on
line diff
--- a/mercurial/util.py Sun May 14 21:07:34 2006 -0700 +++ b/mercurial/util.py Sun May 14 23:44:50 2006 -0700 @@ -536,12 +536,16 @@ def os_rcpath(): '''return default os-specific hgrc search path''' path = system_rcpath() - path.append(os.path.join(os.path.expanduser('~'), 'mercurial.ini')) + path.append(user_rcpath()) userprofile = os.environ.get('USERPROFILE') if userprofile: path.append(os.path.join(userprofile, 'mercurial.ini')) return path + def user_rcpath(): + '''return os-specific hgrc search path to the user dir''' + return os.path.join(os.path.expanduser('~'), 'mercurial.ini') + def parse_patch_output(output_line): """parses the output produced by patch and returns the file name""" pf = output_line[14:]