changeset 34713:e5a2cfc524d4

config: allow remapping the default section The next patch depends on it. It doesn't make sense that the default section can't be remapped with {'': whatever}.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 14 Oct 2017 17:41:41 +0900
parents 56f085334611
children f4aeb952ab77
files mercurial/config.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/config.py	Sat Aug 20 18:33:02 2016 +0900
+++ b/mercurial/config.py	Sat Oct 14 17:41:41 2017 +0900
@@ -118,6 +118,9 @@
         line = 0
         cont = False
 
+        if remap:
+            section = remap.get(section, section)
+
         for l in data.splitlines(True):
             line += 1
             if line == 1 and l.startswith('\xef\xbb\xbf'):