Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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:

[hooks]
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

[ui]
report_untrusted = False

or you can tell Mercurial that you trust the user:

[trusted]
users = mg

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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