3

When performing some action on another user's repo, you will see the message

Not trusting file /home/bob/repo/.hg/hgrc from untrusted user bob, group users

This is fine, and I don't necessarily want to trust bob, but when running certain commands, I don't want to see this output as it can interfere. It is printed to stderr, but I don't want to redirect all stderr output to null, nor do I want to redirect it to stdout and suppress it.

Is there any way to simply prevent mercurial from printing this? -q does not do it.

Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
Explosion Pills
  • 188,624
  • 52
  • 326
  • 405

1 Answers1

3

Yes, you can configure the warning:

[ui]
report_untrusted = False

The config settings are documented online and in the built-in help (hg help config) and in the manual page (man hgrc on a Unix-like system).

Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
  • 3
    Sort of... you can add `--config ui.report_untrusted=False` as needed to any command. You can also add the setting to a `.hg/hgrc` file to use it in a particular repository. – Martin Geisler Oct 28 '11 at 07:46