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

Re: Beefing up vcs_info's Subversion revision number



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