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