Show More
@@ -180,6 +180,17 b' def testpid(pid):' | |||
|
180 | 180 | |
|
181 | 181 | def system_rcpath_win32(): |
|
182 | 182 | '''return default os-specific hgrc search path''' |
|
183 | proc = win32api.GetCurrentProcess() | |
|
184 | try: | |
|
185 | # This will fail on windows < NT | |
|
186 | filename = win32process.GetModuleFileNameEx(proc, 0) | |
|
187 | except: | |
|
188 | filename = win32api.GetModuleFileName(0) | |
|
189 | # Use mercurial.ini found in directory with hg.exe | |
|
190 | progrc = os.path.join(os.path.dirname(filename), 'mercurial.ini') | |
|
191 | if os.path.isfile(progrc): | |
|
192 | return [progrc] | |
|
193 | # else look for a system rcpath in the registry | |
|
183 | 194 | try: |
|
184 | 195 | value = win32api.RegQueryValue( |
|
185 | 196 | win32con.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Mercurial') |
@@ -193,14 +204,7 b' def system_rcpath_win32():' | |||
|
193 | 204 | rcpath.append(os.path.join(p, f)) |
|
194 | 205 | return rcpath |
|
195 | 206 | except pywintypes.error: |
|
196 | pass | |
|
197 | proc = win32api.GetCurrentProcess() | |
|
198 | try: | |
|
199 | # This will fail on windows < NT | |
|
200 | filename = win32process.GetModuleFileNameEx(proc, 0) | |
|
201 | except: | |
|
202 | filename = win32api.GetModuleFileName(0) | |
|
203 | return [os.path.join(os.path.dirname(filename), 'mercurial.ini')] | |
|
207 | return [] | |
|
204 | 208 | |
|
205 | 209 | def user_rcpath_win32(): |
|
206 | 210 | '''return os-specific hgrc search path to the user dir''' |
General Comments 0
You need to be logged in to leave comments.
Login now