comparison mercurial/config.py @ 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 0efdfb57b05c
children 6d6bc544467a
comparison
equal deleted inserted replaced
34712:56f085334611 34713:e5a2cfc524d4
116 section = "" 116 section = ""
117 item = None 117 item = None
118 line = 0 118 line = 0
119 cont = False 119 cont = False
120 120
121 if remap:
122 section = remap.get(section, section)
123
121 for l in data.splitlines(True): 124 for l in data.splitlines(True):
122 line += 1 125 line += 1
123 if line == 1 and l.startswith('\xef\xbb\xbf'): 126 if line == 1 and l.startswith('\xef\xbb\xbf'):
124 # Someone set us up the BOM 127 # Someone set us up the BOM
125 l = l[3:] 128 l = l[3:]