Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: vcs_info: can't get %c and %u to perform as expected



(Could you limit lines of text to something around 75? It's a little
hard to read these overlong lines.)

Alex Satrapa wrote:
> On 06/05/2011, at 15:19 , Frank Terbeck wrote:
[...]
> So apparently the get-revision style needs to be true in order to get
> the 'unstaged' changes flag to show up for Mercurial.

Okay. Then that needs to be documented. (I'll look into it in the
evening - Europe's evening, fwiw.)

> But now I'm even more confused since vcs_info's "staged" and
> "unstaged" changes don't conform to my expectations. I'm expecting
> that my working copy is in one of three states: "dirty" (signified by
> '?' above), having "added but uncommitted" changes (see '+' above), or
> unchanged from VCS. Thus (by my thinking), "unstaged" should conform
> to "dirty", "staged" should conform to "added but uncommitted" - but
> it looks like that's not the case.

Well, the `hg' backend doesn't support `staged' (that's documented,
too). Mercurial doesn't expose its staging area like git does, so we
can't tell if there are staged changes 
AFAIK, for it.

>> There is a file `Misc/vcs_info-examples', which is included with newer
>> versions of zsh. If contains a number of examples for `vcs_info' as its
>> name suggests.
>
> I have been working through that and other sources. My initial problem
> getting the %c/%u escapes to do anything was due to user error (using
> the wrong version of ZSH or at least the vcs_info function).
>
>>  <http://eseth.org/2010/hg-in-zsh/>
>
> I'll keep note of that for sure!

That'll need a pretty recent version of vcs_info, too. He's using looks
in there. I can't remember if those were part of 4.3.11.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



Messages sorted by: Reverse Date, Date, Thread, Author