##// END OF EJS Templates
eliminate win32.user_rcpath_win32()
Adrian Buehlmann -
r13379:67743d5f default
parent child Browse files
Show More
@@ -222,12 +222,6 b' def executable_path():'
222 raise ctypes.WinError(_ERROR_INSUFFICIENT_BUFFER)
222 raise ctypes.WinError(_ERROR_INSUFFICIENT_BUFFER)
223 return buf.value
223 return buf.value
224
224
225 def user_rcpath_win32():
226 '''return os-specific hgrc search path to the user dir'''
227 userdir = os.path.expanduser('~')
228 return [os.path.join(userdir, 'mercurial.ini'),
229 os.path.join(userdir, '.hgrc')]
230
231 def getuser():
225 def getuser():
232 '''return name of current user'''
226 '''return name of current user'''
233 adv = ctypes.windll.advapi32
227 adv = ctypes.windll.advapi32
@@ -107,12 +107,9 b' def system_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'))
General Comments 0
You need to be logged in to leave comments. Login now