comparison mercurial/config.py @ 9469:7f0f882af23d

config: abort on indented non-continuation lines (issue1829) Previously, as soon as a continuation would be met, "cont" would stay forever set to True, but "item" was set back to "None". This caused the continuation code bits to run every time, until the next "self.get(section, item) + '\n'" which would crash.
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Sat, 12 Sep 2009 11:17:07 +0200
parents b87a50b7125c
children bccf780f78ed
comparison
equal deleted inserted replaced
9465:661bc51f09b7 9469:7f0f882af23d
91 continue 91 continue
92 v = self.get(section, item) + "\n" + m.group(1) 92 v = self.get(section, item) + "\n" + m.group(1)
93 self.set(section, item, v, "%s:%d" % (src, line)) 93 self.set(section, item, v, "%s:%d" % (src, line))
94 continue 94 continue
95 item = None 95 item = None
96 cont = False
96 m = includere.match(l) 97 m = includere.match(l)
97 if m: 98 if m:
98 inc = m.group(1) 99 inc = m.group(1)
99 base = os.path.dirname(src) 100 base = os.path.dirname(src)
100 inc = os.path.normpath(os.path.join(base, inc)) 101 inc = os.path.normpath(os.path.join(base, inc))