[PATCH] config: issue1829: reset "cont" when the current line isnt an item continuation

Nicolas Dumazet nicdumz at gmail.com
Mon Sep 14 10:20:19 CDT 2009


# HG changeset patch
# User Nicolas Dumazet <nicdumz.commits at gmail.com>
# Date 1252747027 -7200
# Node ID b95b73ba740fd1719b71e1b9378c33fb1431e5df
# Parent  b2f3b9c82ac05283917e274e96f33c59e491f83c
config: issue1829: reset "cont" when the current line isnt an item continuation

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.

diff --git a/mercurial/config.py b/mercurial/config.py
--- a/mercurial/config.py
+++ b/mercurial/config.py
@@ -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)


More information about the Mercurial-devel mailing list