about summary refs log tree commit diff
path: root/Functions/VCS_Info/Backends/VCS_INFO_get_data_svk
blob: 6107a14f3417da5c4dde4a7a702b81be9c03c9b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
## 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