comparison mercurial/windows.py @ 13379:67743d5f49b6

eliminate win32.user_rcpath_win32()
author Adrian Buehlmann <adrian@cadifra.com>
date Mon, 14 Feb 2011 11:13:05 +0100
parents 244772f67ac1
children 930efdc6bfa4
comparison
equal deleted inserted replaced
13378:244772f67ac1 13379:67743d5f49b6
105 rcpath.append(os.path.join(p, f)) 105 rcpath.append(os.path.join(p, f))
106 return rcpath 106 return rcpath
107 107
108 def user_rcpath(): 108 def user_rcpath():
109 '''return os-specific hgrc search path to the user dir''' 109 '''return os-specific hgrc search path to the user dir'''
110 try: 110 home = os.path.expanduser('~')
111 path = user_rcpath_win32() 111 path = [os.path.join(home, 'mercurial.ini'),
112 except: 112 os.path.join(home, '.hgrc')]
113 home = os.path.expanduser('~')
114 path = [os.path.join(home, 'mercurial.ini'),
115 os.path.join(home, '.hgrc')]
116 userprofile = os.environ.get('USERPROFILE') 113 userprofile = os.environ.get('USERPROFILE')
117 if userprofile: 114 if userprofile:
118 path.append(os.path.join(userprofile, 'mercurial.ini')) 115 path.append(os.path.join(userprofile, 'mercurial.ini'))
119 path.append(os.path.join(userprofile, '.hgrc')) 116 path.append(os.path.join(userprofile, '.hgrc'))
120 return path 117 return path