I'm using zsh with vcs_info and it works nicely except when browsing a repo which is set up for Trac/Mercurial. Specifically, the hgrc for the repo has the following line in [hooks]:

changegroup = python:tracext.hg.hooks.add_changesets

as per the documentation.

This leads to my vcs_info prompt displaying the branch as configuration option hooks.changegroup = python:tracext.hg.hooks.add_changesets and my revision as untrusted.

Any ideas on why this is happening?


I don't have experience with vcs_info, but from your description it sounds like you need to read the Mercurial wiki page on trust.

Briefly, Mercurial wont read a .hg/hgrc file that don't belong to you or a "trusted" user. Imagine that I can create a repository with a .hg/hgrc file containing:

pre-status = rm -rf $HOME

If you now run hg status inside this repository you'll see

% hg status
not trusting file /tmp/trust/.hg/hgrc from untrusted user mg, group mg

which means that Mercurial avoided disaster by not reading the file. You can either silence the warning with

report_untrusted = False

or you can tell Mercurial that you trust the user:

users = mg

That will make Mercurial read the config file even though it is owned by the other user.

  • Unfortunately, it's not a trust issue - my .hgrc is fully configured for trust (amoung other things). – Mel Boyce Aug 23 '12 at 0:28
  • @MelBoyce: ah, that's too bad. I grepped the Mercurial source for configuration option (since that show up as your branch name), and it's only printed twice: both times when Mercurial tries to read a config value from an untrusted config file. So it's still my best guess, but as I said I don't know what commands vcs_info calls. – Martin Geisler Aug 23 '12 at 8:18
  • It is possible that vcs_info isn't reading my hgrc, I suppose. I should check the source. – Mel Boyce Aug 24 '12 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.