Patchwork D1947: configitems: traverse sections deterministically

login
register
mail settings
Submitter phabricator
Date Jan. 29, 2018, 9:30 p.m.
Message ID <differential-rev-PHID-DREV-iemtqmuknohutlr3qdbx-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27077/
State Superseded
Headers show

Comments

phabricator - Jan. 29, 2018, 9:30 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Otherwise output can be non-deterministic if there are warnings
  for multiple sections.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1947

AFFECTED FILES
  mercurial/configitems.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -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)