diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -440,7 +440,7 @@ try: cfg.read(filename, fp, sections=sections, remap=remap) fp.close() - except error.ConfigError as inst: + except error.ParseError as inst: if trusted: raise self.warn(_(b"ignored: %s\n") % stringutil.forcebytestr(inst)) diff --git a/tests/test-trusted.py.out b/tests/test-trusted.py.out --- a/tests/test-trusted.py.out +++ b/tests/test-trusted.py.out @@ -174,7 +174,7 @@ # parse error # different user, different group not trusting file .hg/hgrc from untrusted user abc, group def -ParseError('foo', '.hg/hgrc:1') +ignored: ('foo', '.hg/hgrc:1') # same user, same group ParseError('foo', '.hg/hgrc:1')