Mercurial:防止打印出不受信任的警告
当对另一个用户的存储库执行某些操作时,您将看到消息
Not trusting file /home/bob/repo/.hg/hgrc from untrusted user bob, group users
This is Fine, and I don't一定要信任 bob
,但是当运行某些命令时,我不想看到此消息输出,因为它会干扰。它被打印到 stderr,但我不想将所有 stderr 输出重定向到 null,也不想将其重定向到 stdout 并抑制它。
有什么办法可以简单地阻止 Mercurial 打印此内容吗? -q
不这样做。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您可以配置警告:
配置设置在线记录并且在内置帮助 (
hg help config
) 和手册页 (man hgrc
在类 Unix 系统上) 中。Yes, you can configure the warning:
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).