changeset 45843: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 793976f9029c
children 8f07f5a9c3de
files mercurial/scmposix.py mercurial/scmwindows.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmposix.py	Sun Nov 08 20:12:32 2020 +0100
+++ b/mercurial/scmposix.py	Tue Nov 03 09:56:02 2020 -0800
@@ -27,7 +27,7 @@
         rcs.extend(
             [
                 os.path.join(rcdir, f)
-                for f, kind in util.listdir(rcdir)
+                for f, kind in sorted(util.listdir(rcdir))
                 if f.endswith(b".rc")
             ]
         )
--- a/mercurial/scmwindows.py	Sun Nov 08 20:12:32 2020 +0100
+++ b/mercurial/scmwindows.py	Tue Nov 03 09:56:02 2020 -0800
@@ -31,7 +31,7 @@
 
     def _processdir(progrcd):
         if os.path.isdir(progrcd):
-            for f, kind in util.listdir(progrcd):
+            for f, kind in sorted(util.listdir(progrcd)):
                 if f.endswith(b'.rc'):
                     rcpath.append(os.path.join(progrcd, f))