# HG changeset patch # User Yuya Nishihara # Date 2017-10-14 08:41:41 # Node ID e5a2cfc524d42bf09b4ed5766bb9031fe5c1f0e0 # Parent 56f0853346112448b96140dbfd1d3597d061bd84 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}. diff --git a/mercurial/config.py b/mercurial/config.py --- a/mercurial/config.py +++ b/mercurial/config.py @@ -118,6 +118,9 @@ class config(object): 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'):