# HG changeset patch # User Martin von Zweigbergk # Date 1605897116 28800 # Node ID e5a0efd26f7aced809b846b3e46d41c589c03b0d # Parent c9b14c56fc2bc3a3204440647f4c2805d24742b1 config: clean up message about ignored untrusted config The error message relied on Python's default formatting of arguments to an Exception's constructor. Let's try to make it a little more readable for users. Differential Revision: https://phab.mercurial-scm.org/D9352 diff -r c9b14c56fc2b -r e5a0efd26f7a mercurial/ui.py --- a/mercurial/ui.py Fri Nov 20 10:22:58 2020 -0800 +++ b/mercurial/ui.py Fri Nov 20 10:31:56 2020 -0800 @@ -469,7 +469,9 @@ except error.ParseError as inst: if trusted: raise - self.warn(_(b'ignored: %s\n') % stringutil.forcebytestr(inst)) + self.warn( + _(b'ignored %s: %s\n') % (inst.location, inst.message) + ) self._applyconfig(cfg, trusted, root) diff -r c9b14c56fc2b -r e5a0efd26f7a tests/test-trusted.py.out --- a/tests/test-trusted.py.out Fri Nov 20 10:22:58 2020 -0800 +++ b/tests/test-trusted.py.out Fri Nov 20 10:31:56 2020 -0800 @@ -174,7 +174,7 @@ # parse error # different user, different group not trusting file .hg/hgrc from untrusted user abc, group def -ignored: ('foo', '.hg/hgrc:1') +ignored .hg/hgrc:1: foo # same user, same group hg: parse error at .hg/hgrc:1: foo