Show More
@@ -968,13 +968,15 b" if os.name == 'nt':" | |||||
968 | def user_rcpath(): |
|
968 | def user_rcpath(): | |
969 | '''return os-specific hgrc search path to the user dir''' |
|
969 | '''return os-specific hgrc search path to the user dir''' | |
970 | try: |
|
970 | try: | |
971 |
|
|
971 | path = user_rcpath_win32() | |
972 | except: |
|
972 | except: | |
973 |
|
|
973 | home = os.path.expanduser('~') | |
974 | path = [userrc] |
|
974 | path = [os.path.join(home, 'mercurial.ini'), | |
|
975 | os.path.join(home, '.hgrc')] | |||
975 | userprofile = os.environ.get('USERPROFILE') |
|
976 | userprofile = os.environ.get('USERPROFILE') | |
976 | if userprofile: |
|
977 | if userprofile: | |
977 | path.append(os.path.join(userprofile, 'mercurial.ini')) |
|
978 | path.append(os.path.join(userprofile, 'mercurial.ini')) | |
|
979 | path.append(os.path.join(userprofile, '.hgrc')) | |||
978 | return path |
|
980 | return path | |
979 |
|
981 | |||
980 | def parse_patch_output(output_line): |
|
982 | def parse_patch_output(output_line): |
@@ -255,7 +255,8 b' def user_rcpath_win32():' | |||||
255 | appdir = shell.SHGetPathFromIDList( |
|
255 | appdir = shell.SHGetPathFromIDList( | |
256 | shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_APPDATA)) |
|
256 | shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_APPDATA)) | |
257 | userdir = os.path.dirname(appdir) |
|
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 | class posixfile_nt(object): |
|
261 | class posixfile_nt(object): | |
261 | '''file object with posix-like semantics. on windows, normal |
|
262 | '''file object with posix-like semantics. on windows, normal |
General Comments 0
You need to be logged in to leave comments.
Login now