changeset 2117:760339ccc799

fix issue 217. fall back to fixed path if windows >= nt function not present.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Tue, 25 Apr 2006 08:37:05 -0700
parents fd77b7ee4aac
children e296dee1cd9a
files mercurial/util.py mercurial/util_win32.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Fri Apr 21 16:09:43 2006 -0700
+++ b/mercurial/util.py	Tue Apr 25 08:37:05 2006 -0700
@@ -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	Fri Apr 21 16:09:43 2006 -0700
+++ b/mercurial/util_win32.py	Tue Apr 25 08:37:05 2006 -0700
@@ -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)