configitems: traverse sections deterministically stable
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 29 Jan 2018 13:30:29 -0800
branchstable
changeset 35808 178aacdc25db
parent 35807 4425790f2373
child 35809 f9a82b9b2c36
configitems: traverse sections deterministically Otherwise output can be non-deterministic if there are warnings for multiple sections. Differential Revision: https://phab.mercurial-scm.org/D1947
mercurial/configitems.py
--- a/mercurial/configitems.py	Mon Jan 29 21:42:18 2018 -0500
+++ b/mercurial/configitems.py	Mon Jan 29 13:30:29 2018 -0800
@@ -17,7 +17,7 @@
 
 def loadconfigtable(ui, extname, configtable):
     """update config item known to the ui with the extension ones"""
-    for section, items in configtable.items():
+    for section, items in sorted(configtable.items()):
         knownitems = ui._knownconfig.setdefault(section, itemregister())
         knownkeys = set(knownitems)
         newkeys = set(items)