config: abort on indented non-continuation lines (issue1829)
authorNicolas Dumazet <nicdumz.commits@gmail.com>
Sat, 12 Sep 2009 11:17:07 +0200
changeset 9469 7f0f882af23d
parent 9465 661bc51f09b7
child 9470 ba75830d17a9
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.
mercurial/config.py
--- a/mercurial/config.py	Fri Sep 18 21:25:47 2009 +0900
+++ b/mercurial/config.py	Sat Sep 12 11:17:07 2009 +0200
@@ -93,6 +93,7 @@
                     self.set(section, item, v, "%s:%d" % (src, line))
                     continue
                 item = None
+                cont = False
             m = includere.match(l)
             if m:
                 inc = m.group(1)