Angel Ezquerra  committed 18892a0

Honor the configuration file priority while loading the projrc file settings

  • Participants
  • Parent commits 4a1235e
  • Branches default

Comments (1)

Files changed (1)

 import os, sys, fnmatch
+from operator import itemgetter
 from mercurial import hg, extensions, pushkey, config, util, error
 from mercurial import commands, dispatch, cmdutil
 from mercurial.i18n import _
         for key, value in cfg.items(section):
             src = cfg.source(section, key)
             items.append((classifycfgpath(src), key, value, src))
-        items.sort() # list.sort implements a stable sort
+        # sort the config items according to their cfg file priority
+        items.sort(key=itemgetter(0)) # list.sort implements a stable sort
         for order, key, value, src in items:
             cfg.set(section, key, value, src)