# HG changeset patch # User Matt Harbison # Date 1539380085 14400 # Node ID ab04ce6f0674b7c1042ef780d2bcbe1d79f1c65e # Parent d6b7c4e77bb414fa27fed41e834423fca7d6ce63 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 -r d6b7c4e77bb4 -r ab04ce6f0674 mercurial/windows.py --- a/mercurial/windows.py Sat Oct 13 16:57:28 2018 +0200 +++ b/mercurial/windows.py Fri Oct 12 17:34:45 2018 -0400 @@ -583,7 +583,8 @@ for s in scope: try: with winreg.OpenKey(s, encoding.strfromlocal(key)) as hkey: - val = winreg.QueryValueEx(hkey, valname)[0] + name = valname and encoding.strfromlocal(valname) or valname + val = winreg.QueryValueEx(hkey, name)[0] # never let a Unicode string escape into the wild return encoding.unitolocal(val) except EnvironmentError: