mercurial/scmwindows.py
branchstable
changeset 43748 a50fecefa691
parent 43077 687b865b95ad
child 43793 29adf0a087a1
equal deleted inserted replaced
43747:5470e63686ca 43748:a50fecefa691
    35                 rcpath.append(os.path.join(progrcd, f))
    35                 rcpath.append(os.path.join(progrcd, f))
    36     # else look for a system rcpath in the registry
    36     # else look for a system rcpath in the registry
    37     value = util.lookupreg(
    37     value = util.lookupreg(
    38         b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE
    38         b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE
    39     )
    39     )
    40     if not isinstance(value, str) or not value:
    40     if not isinstance(value, bytes) or not value:
    41         return rcpath
    41         return rcpath
    42     value = util.localpath(value)
    42     value = util.localpath(value)
    43     for p in value.split(pycompat.ospathsep):
    43     for p in value.split(pycompat.ospathsep):
    44         if p.lower().endswith(b'mercurial.ini'):
    44         if p.lower().endswith(b'mercurial.ini'):
    45             rcpath.append(p)
    45             rcpath.append(p)