[PATCH] py3: use str to query registry values on Windows
Matt Harbison
mharbison72 at gmail.com
Fri Oct 12 21:44:47 UTC 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1539380085 14400
# Fri Oct 12 17:34:45 2018 -0400
# Node ID 473751b3bbfce976fd6a821859d1d45f27c1ace1
# Parent 5b8bab9a7e07692e8d827c5315502301a11e4803
py3: use str to query registry values on Windows
This blew up launching any command if extdiff processed a tool with a regkey
config.
diff --git a/mercurial/windows.py b/mercurial/windows.py
--- a/mercurial/windows.py
+++ b/mercurial/windows.py
@@ -583,7 +583,8 @@ def lookupreg(key, valname=None, scope=N
for s in scope:
try:
with winreg.OpenKey(s, encoding.strfromlocal(key)) as hkey:
- val = winreg.QueryValueEx(hkey, valname)[0]
+ val = winreg.QueryValueEx(hkey,
+ encoding.strfromlocal(valname))[0]
# never let a Unicode string escape into the wild
return encoding.unitolocal(val)
except EnvironmentError:
More information about the Mercurial-devel
mailing list