mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-24 17:42:28 -04:00
21 lines
729 B
Bash
21 lines
729 B
Bash
## vim:ft=zsh
|
|
## svk support by: Frank Terbeck <ft@bewatermyfriend.org>
|
|
## Distributed under the same BSD-ish license as zsh itself.
|
|
|
|
setopt localoptions NO_shwordsplit
|
|
local svkbranch svkbase
|
|
local -xA hook_com
|
|
|
|
svkbase=${vcs_comm[basedir]}
|
|
rrn=${svkbase:t}
|
|
zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" branchformat svkbranch || svkbranch="%b:%r"
|
|
hook_com=( branch "${vcs_comm[branch]}" revision "${vcs_comm[revision]}" )
|
|
if VCS_INFO_hook 'set-branch-format' "${svkbranch}"; then
|
|
zformat -f svkbranch "${svkbranch}" "b:${hook_com[branch]}" "r:${hook_com[revision]}"
|
|
else
|
|
svkbranch=${hook_com[branch-replace]}
|
|
fi
|
|
hook_com=()
|
|
VCS_INFO_formats '' "${svkbranch}" "${svkbase}" '' '' "${vcs_comm[revision]}" ''
|
|
return 0
|