* Beefing up vcs_info's Subversion revision number
@ 2010-03-31 13:13 David Evans
2010-03-31 14:32 ` Frank Terbeck
0 siblings, 1 reply; 2+ messages in thread
From: David Evans @ 2010-03-31 13:13 UTC (permalink / raw)
To: zsh-users
Hi, all.
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?
Ta.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Beefing up vcs_info's Subversion revision number
2010-03-31 13:13 Beefing up vcs_info's Subversion revision number David Evans
@ 2010-03-31 14:32 ` Frank Terbeck
0 siblings, 0 replies; 2+ messages in thread
From: Frank Terbeck @ 2010-03-31 14:32 UTC (permalink / raw)
To: David Evans; +Cc: zsh-users
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-31 14:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-31 13:13 Beefing up vcs_info's Subversion revision number David Evans
2010-03-31 14:32 ` Frank Terbeck
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).