equal
deleted
inserted
replaced
100 except EnvironmentError: |
100 except EnvironmentError: |
101 pass |
101 pass |
102 |
102 |
103 def system_rcpath_win32(): |
103 def system_rcpath_win32(): |
104 '''return default os-specific hgrc search path''' |
104 '''return default os-specific hgrc search path''' |
105 proc = win32api.GetCurrentProcess() |
105 filename = win32api.GetModuleFileName(0) |
106 try: |
|
107 # This will fail on windows < NT |
|
108 filename = win32process.GetModuleFileNameEx(proc, 0) |
|
109 except: |
|
110 filename = win32api.GetModuleFileName(0) |
|
111 # Use mercurial.ini found in directory with hg.exe |
106 # Use mercurial.ini found in directory with hg.exe |
112 progrc = os.path.join(os.path.dirname(filename), 'mercurial.ini') |
107 progrc = os.path.join(os.path.dirname(filename), 'mercurial.ini') |
113 if os.path.isfile(progrc): |
108 if os.path.isfile(progrc): |
114 return [progrc] |
109 return [progrc] |
115 # Use hgrc.d found in directory with hg.exe |
110 # Use hgrc.d found in directory with hg.exe |