Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 4098:c08b6af023bc
util_win32.py: fix user_rcpath
Fixes issue504.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 16 Feb 2007 05:53:03 -0200 |
parents | 403c4ddd74bb |
children | 9dc64c8414ca |
comparison
equal
deleted
inserted
replaced
4097:403c4ddd74bb | 4098:c08b6af023bc |
---|---|
799 except: | 799 except: |
800 return [r'c:\mercurial\mercurial.ini'] | 800 return [r'c:\mercurial\mercurial.ini'] |
801 | 801 |
802 def user_rcpath(): | 802 def user_rcpath(): |
803 '''return os-specific hgrc search path to the user dir''' | 803 '''return os-specific hgrc search path to the user dir''' |
804 path = [os.path.join(os.path.expanduser('~'), 'mercurial.ini')] | 804 try: |
805 userrc = user_rcpath_win32() | |
806 except: | |
807 userrc = os.path.join(os.path.expanduser('~'), 'mercurial.ini') | |
808 path = [userrc] | |
805 userprofile = os.environ.get('USERPROFILE') | 809 userprofile = os.environ.get('USERPROFILE') |
806 if userprofile: | 810 if userprofile: |
807 path.append(os.path.join(userprofile, 'mercurial.ini')) | 811 path.append(os.path.join(userprofile, 'mercurial.ini')) |
808 return path | 812 return path |
809 | 813 |