Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Beefing up vcs_info's Subversion revision number
- X-seq: zsh-users 14977
 
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
 
- To: David Evans <David.Evans@xxxxxxxxxxxx>
 
- Subject: Re: Beefing up vcs_info's Subversion revision number
 
- Date: Wed, 31 Mar 2010 16:32:07 +0200
 
- Cc: zsh-users@xxxxxxx
 
- In-reply-to: <20100331131304.GA4605@xxxxxxxxxxxx> (David Evans's message of	"Wed, 31 Mar 2010 14:13:04 +0100")
 
- List-help: <mailto:zsh-users-help@zsh.org>
 
- List-id: Zsh Users List <zsh-users.zsh.org>
 
- List-post: <mailto:zsh-users@zsh.org>
 
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
 
- References: <20100331131304.GA4605@xxxxxxxxxxxx>
 
David Evans wrote:
>   vcs_info's subversion back-end parses the output from "svn info" for
> branch revision (%r) numbers.  Fair enough.  What's the best way to
> instead use the output of "svnversion", assuming of course that I'm
> happy with the cost?  Have at the var myself after calling vcs_info()?
> Hooks?  Hack up VCS_INFO_get_data_svn?  Make a new, fictitious back-end?
With vcs_info from CVS you can modify `%r' from a `set-branch-format'
hook.  The basic idea would look something like this:
zstyle â:vcs_info:svn+set-branch-format:*â hooks fixrevision
function +vi-fixrevision() {
  hook_com[revision]="$(the_command_that_does_it_better)"
}
The manual should have all the info you need.
When you got it working, I'd be interested in the hook, because I'm
compiling a set of vcs_info configuration examples. :-)
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