changeset 45777 | 0883413e09bc |
parent 45257 | 668af67bfd18 |
child 45894 | 9dc1351d0b5f |
--- a/mercurial/config.py Thu Oct 22 09:58:05 2020 -0700 +++ b/mercurial/config.py Thu Oct 22 10:57:11 2020 -0700 @@ -200,7 +200,10 @@ self._unset.append((section, name)) continue - raise error.ParseError(l.rstrip(), (b"%s:%d" % (src, line))) + message = l.rstrip() + if l.startswith(b' '): + message = b"unexpected leading whitespace: %s" % message + raise error.ParseError(message, (b"%s:%d" % (src, line))) def read(self, path, fp=None, sections=None, remap=None): if not fp: