# HG changeset patch # User Alexis S. L. Carvalho # Date 1171612383 7200 # Node ID c08b6af023bcbb3352875740f2549c239b3759e6 # Parent 403c4ddd74bbff32ce930f1c062bccb426c863fa util_win32.py: fix user_rcpath Fixes issue504. diff -r 403c4ddd74bb -r c08b6af023bc mercurial/util.py --- a/mercurial/util.py Thu Feb 15 09:51:57 2007 -0700 +++ b/mercurial/util.py Fri Feb 16 05:53:03 2007 -0200 @@ -801,7 +801,11 @@ def user_rcpath(): '''return os-specific hgrc search path to the user dir''' - path = [os.path.join(os.path.expanduser('~'), 'mercurial.ini')] + try: + userrc = user_rcpath_win32() + except: + userrc = os.path.join(os.path.expanduser('~'), 'mercurial.ini') + path = [userrc] userprofile = os.environ.get('USERPROFILE') if userprofile: path.append(os.path.join(userprofile, 'mercurial.ini')) diff -r 403c4ddd74bb -r c08b6af023bc mercurial/util_win32.py --- a/mercurial/util_win32.py Thu Feb 15 09:51:57 2007 -0700 +++ b/mercurial/util_win32.py Fri Feb 16 05:53:03 2007 -0200 @@ -187,7 +187,7 @@ filename = win32api.GetModuleFileName(0) return [os.path.join(os.path.dirname(filename), 'mercurial.ini')] -def user_rcpath(): +def user_rcpath_win32(): '''return os-specific hgrc search path to the user dir''' userdir = os.path.expanduser('~') if userdir == '~':