error: fix up test-hgrc

This commit is contained in:
Matt Mackall 2010-06-04 23:04:31 -05:00
parent 0625b02fef
commit 476998d3a8
3 changed files with 7 additions and 8 deletions

View File

@ -103,10 +103,9 @@ class config(object):
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

View File

@ -36,7 +36,7 @@ class Abort(Exception):
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):

View File

@ -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
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