diff -r b901bb751999 -r 2123aad24d56 mercurial/config.py --- a/mercurial/config.py Fri Jun 04 20:19:53 2010 -0500 +++ b/mercurial/config.py Fri Jun 04 20:57:26 2010 -0500 @@ -103,10 +103,10 @@ try: include(inc, remap=remap, sections=sections) except IOError, inst: - msg = _("config error at %s:%d: " - "cannot include %s (%s)") \ - % (src, line, inc, inst.strerror) - raise error.ConfigError(msg) + raise error.ParseError( + _("cannot include %s (%s)") + % (inc, inst.strerror), + msg, "%s:%s" % (src, line)) continue if emptyre.match(l): continue @@ -135,8 +135,7 @@ del self._data[section][name] continue - raise error.ConfigError(_("config error at %s:%d: '%s'") - % (src, line, l.rstrip())) + raise error.ParseError(l.rstrip(), ("%s:%s" % (src, line))) def read(self, path, fp=None, sections=None, remap=None): if not fp: