error: fix up test-hgrc
authorMatt Mackall <mpm@selenic.com>
Fri, 04 Jun 2010 23:04:31 -0500
changeset 11292 037d910734de
parent 11291 543597fae51d
child 11293 0e5ce2325795
error: fix up test-hgrc
mercurial/config.py
mercurial/error.py
tests/test-hgrc.out
--- a/mercurial/config.py	Fri Jun 04 23:00:22 2010 -0500
+++ b/mercurial/config.py	Fri Jun 04 23:04:31 2010 -0500
@@ -103,10 +103,9 @@
                     try:
                         include(inc, remap=remap, sections=sections)
                     except IOError, inst:
-                        raise error.ParseError(
-                            _("cannot include %s (%s)")
-                            % (inc, inst.strerror),
-                            msg, "%s:%s" % (src, line))
+                        raise error.ParseError(_("cannot include %s (%s)")
+                                               % (inc, inst.strerror),
+                                               "%s:%s" % (src, line))
                 continue
             if emptyre.match(l):
                 continue
--- a/mercurial/error.py	Fri Jun 04 23:00:22 2010 -0500
+++ b/mercurial/error.py	Fri Jun 04 23:04:31 2010 -0500
@@ -36,7 +36,7 @@
 class ConfigError(Abort):
     'Exception raised when parsing config files'
 
-class ParseError(Abort):
+class ParseError(Exception):
     'Exception raised when parsing config files (msg[, pos])'
 
 class RepoError(Exception):
--- a/tests/test-hgrc.out	Fri Jun 04 23:00:22 2010 -0500
+++ b/tests/test-hgrc.out	Fri Jun 04 23:04:31 2010 -0500
@@ -1,4 +1,4 @@
-hg: config error at $HGRCPATH:1: 'invalid'
+hg: parse error at $HGRCPATH:1: invalid
 updating to branch default
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 [paths]
@@ -6,10 +6,10 @@
 default = .../foo%bar
 bundle.mainreporoot=.../foobar
 paths.default=.../foo%bar
-hg: config error at $HGRCPATH:2: '  x = y'
+hg: parse error at $HGRCPATH:2:   x = y
 foo.bar=a\nb\nc\nde\nfg
 foo.baz=bif cb
-hg: config error at $HGRCPATH:1: cannot include /path/to/nowhere/no-such-file (No such file or directory)
+hg: parse error at $HGRCPATH:1: cannot include /path/to/nowhere/no-such-file (No such file or directory)
 % username expansion
 John Doe
 ui.username=$FAKEUSER