--- a/mercurial/util.py Tue Apr 25 19:38:19 2006 +0200
+++ b/mercurial/util.py Tue Apr 25 19:38:45 2006 +0200
@@ -574,7 +574,10 @@
sys.stdout = winstdout(sys.stdout)
def system_rcpath():
- return [r'c:\mercurial\mercurial.ini']
+ try:
+ return system_rcpath_win32()
+ except:
+ return [r'c:\mercurial\mercurial.ini']
def os_rcpath():
'''return default os-specific hgrc search path'''
--- a/mercurial/util_win32.py Tue Apr 25 19:38:19 2006 +0200
+++ b/mercurial/util_win32.py Tue Apr 25 19:38:45 2006 +0200
@@ -164,7 +164,7 @@
return details[0] != winerror.ERROR_INVALID_PARAMETER
return True
-def system_rcpath():
+def system_rcpath_win32():
'''return default os-specific hgrc search path'''
proc = win32api.GetCurrentProcess()
filename = win32process.GetModuleFileNameEx(proc, 0)