Show More
@@ -29,7 +29,7 b' def _findtool(ui, tool):' | |||||
29 | k = _toolstr(ui, tool, kn) |
|
29 | k = _toolstr(ui, tool, kn) | |
30 | if not k: |
|
30 | if not k: | |
31 | continue |
|
31 | continue | |
32 |
p = util.lookup |
|
32 | p = util.lookupreg(k, _toolstr(ui, tool, "regname")) | |
33 | if p: |
|
33 | if p: | |
34 | p = util.find_exe(p + _toolstr(ui, tool, "regappend")) |
|
34 | p = util.find_exe(p + _toolstr(ui, tool, "regappend")) | |
35 | if p: |
|
35 | if p: |
@@ -439,8 +439,8 b' else:' | |||||
439 | rcpath.append(os.path.join(progrcd, f)) |
|
439 | rcpath.append(os.path.join(progrcd, f)) | |
440 | return rcpath |
|
440 | return rcpath | |
441 | # else look for a system rcpath in the registry |
|
441 | # else look for a system rcpath in the registry | |
442 |
value = util.lookup |
|
442 | value = util.lookupreg('SOFTWARE\\Mercurial', None, | |
443 |
|
|
443 | _HKEY_LOCAL_MACHINE) | |
444 | if not isinstance(value, str) or not value: |
|
444 | if not isinstance(value, str) or not value: | |
445 | return rcpath |
|
445 | return rcpath | |
446 | value = value.replace('/', os.sep) |
|
446 | value = value.replace('/', os.sep) |
@@ -487,7 +487,7 b' def checkwinfilename(path):' | |||||
487 | return _("filename ends with '%s', which is not allowed " |
|
487 | return _("filename ends with '%s', which is not allowed " | |
488 | "on Windows") % t |
|
488 | "on Windows") % t | |
489 |
|
489 | |||
490 |
def lookup |
|
490 | def lookupreg(key, name=None, scope=None): | |
491 | return None |
|
491 | return None | |
492 |
|
492 | |||
493 | def hidewindow(): |
|
493 | def hidewindow(): |
@@ -180,7 +180,7 b' def testpid(pid):' | |||||
180 | _kernel32.CloseHandle(h) |
|
180 | _kernel32.CloseHandle(h) | |
181 | return _kernel32.GetLastError() != _ERROR_INVALID_PARAMETER |
|
181 | return _kernel32.GetLastError() != _ERROR_INVALID_PARAMETER | |
182 |
|
182 | |||
183 |
def lookup |
|
183 | def lookupreg(key, valname=None, scope=None): | |
184 | ''' Look up a key/value name in the Windows registry. |
|
184 | ''' Look up a key/value name in the Windows registry. | |
185 |
|
185 | |||
186 | valname: value name. If unspecified, the default value for the key |
|
186 | valname: value name. If unspecified, the default value for the key |
General Comments 0
You need to be logged in to leave comments.
Login now