Mercurial > hg
comparison mercurial/scmwindows.py @ 43923:9a3ac902d597
windows: clarify a comment about the hgrc search path
The exe relative hgrc.d and the registry paths are not mutually exclusive.
Differential Revision: https://phab.mercurial-scm.org/D7689
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 17 Dec 2019 21:15:59 -0500 |
parents | 29adf0a087a1 |
children | fa3835a15a17 |
comparison
equal
deleted
inserted
replaced
43922:70abcb614a5c | 43923:9a3ac902d597 |
---|---|
32 progrcd = os.path.join(os.path.dirname(filename), b'hgrc.d') | 32 progrcd = os.path.join(os.path.dirname(filename), b'hgrc.d') |
33 if os.path.isdir(progrcd): | 33 if os.path.isdir(progrcd): |
34 for f, kind in util.listdir(progrcd): | 34 for f, kind in util.listdir(progrcd): |
35 if f.endswith(b'.rc'): | 35 if f.endswith(b'.rc'): |
36 rcpath.append(os.path.join(progrcd, f)) | 36 rcpath.append(os.path.join(progrcd, f)) |
37 # else look for a system rcpath in the registry | 37 # next look for a system rcpath in the registry |
38 value = util.lookupreg( | 38 value = util.lookupreg( |
39 b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE | 39 b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE |
40 ) | 40 ) |
41 if not isinstance(value, bytes) or not value: | 41 if not isinstance(value, bytes) or not value: |
42 return rcpath | 42 return rcpath |