Patchwork D7532: windows: fix an issue causing registry config paths to be ignored on py3

login
register
mail settings
Submitter phabricator
Date Dec. 2, 2019, 10 p.m.
Message ID <3ca16006546a699822f783333f219943@localhost.localdomain>
Download mbox | patch
Permalink /patch/43576/
State Not Applicable
Headers show

Comments

phabricator - Dec. 2, 2019, 10 p.m.
Closed by commit rHGa50fecefa691: windows: fix an issue causing registry config paths to be ignored on py3 (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7532?vs=18408&id=18433

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7532/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7532

AFFECTED FILES
  mercurial/scmwindows.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/scmwindows.py b/mercurial/scmwindows.py
--- a/mercurial/scmwindows.py
+++ b/mercurial/scmwindows.py
@@ -37,7 +37,7 @@ 
     value = util.lookupreg(
         b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE
     )
-    if not isinstance(value, str) or not value:
+    if not isinstance(value, bytes) or not value:
         return rcpath
     value = util.localpath(value)
     for p in value.split(pycompat.ospathsep):