[PATCH 02 of 10 RFC v2] ui: add a defaults layer to the config

David Soria Parra davidsp at fb.com
Sun Mar 12 18:40:25 EDT 2017


# HG changeset patch
# User David Soria Parra <davidsp at fb.com>
# Date 1489349206 25200
#      Sun Mar 12 13:06:46 2017 -0700
# Node ID 084a30b54810d05c8b44d22fcab2ef6f783a9f7c
# Parent  99514a82d5b23c75bd6da38e522acfd14a618c14
ui: add a defaults layer to the config

Add a defaults layer to the config that has the least precedence. This will
allow us to load defaults based on compatibility settings without interferring
with trusted or user.

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -304,7 +304,8 @@
     def cfg(self):
         # Ordered in ascneding order of preference.
         return util.sortdict(
-            [('user', config.config()),
+            [('defaults', config.config()),
+            ('user', config.config()),
             ('trusted', config.config()),
             ('overlay', config.config())])
 


More information about the Mercurial-devel mailing list