comparison mercurial/scmwindows.py @ 45824:9ac96b9fa76e

config: read system hgrc in lexicographical order This is similar to edbcf5b239f9 (config: read configs from directories in lexicographical order, 2019-04-03). Apparently I forgot to sort the system hgrc files there. That's fixed by this patch. Differential Revision: https://phab.mercurial-scm.org/D9269
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 03 Nov 2020 09:56:02 -0800
parents 1ccf340acf14
children 224af78021de
comparison
equal deleted inserted replaced
45823:793976f9029c 45824:9ac96b9fa76e
29 progrc = os.path.join(os.path.dirname(filename), b'mercurial.ini') 29 progrc = os.path.join(os.path.dirname(filename), b'mercurial.ini')
30 rcpath.append(progrc) 30 rcpath.append(progrc)
31 31
32 def _processdir(progrcd): 32 def _processdir(progrcd):
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 sorted(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 37
38 # Use hgrc.d found in directory with hg.exe 38 # Use hgrc.d found in directory with hg.exe
39 _processdir(os.path.join(os.path.dirname(filename), b'hgrc.d')) 39 _processdir(os.path.join(os.path.dirname(filename), b'hgrc.d'))