##// END OF EJS Templates
Also search for .hgrc if mercurial.ini not found on windows
Stefan Rank <strank(AT)strank(DOT)info> -
r6153:09a8be3e default
parent child Browse files
Show More
@@ -968,13 +968,15 b" if os.name == 'nt':"
968 968 def user_rcpath():
969 969 '''return os-specific hgrc search path to the user dir'''
970 970 try:
971 userrc = user_rcpath_win32()
971 path = user_rcpath_win32()
972 972 except:
973 userrc = os.path.join(os.path.expanduser('~'), 'mercurial.ini')
974 path = [userrc]
973 home = os.path.expanduser('~')
974 path = [os.path.join(home, 'mercurial.ini'),
975 os.path.join(home, '.hgrc')]
975 976 userprofile = os.environ.get('USERPROFILE')
976 977 if userprofile:
977 978 path.append(os.path.join(userprofile, 'mercurial.ini'))
979 path.append(os.path.join(userprofile, '.hgrc'))
978 980 return path
979 981
980 982 def parse_patch_output(output_line):
@@ -255,7 +255,8 b' def user_rcpath_win32():'
255 255 appdir = shell.SHGetPathFromIDList(
256 256 shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_APPDATA))
257 257 userdir = os.path.dirname(appdir)
258 return os.path.join(userdir, 'mercurial.ini')
258 return [os.path.join(userdir, 'mercurial.ini'),
259 os.path.join(userdir, '.hgrc')]
259 260
260 261 class posixfile_nt(object):
261 262 '''file object with posix-like semantics. on windows, normal
General Comments 0
You need to be logged in to leave comments. Login now