zsh-workers
 help / color / mirror / code / Atom feed
e1808058542eb75416b7606c9ea1eb5d9c078806 blob 1048 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
## vim:ft=zsh
## subversion support by:
##  + Frank Terbeck <ft@bewatermyfriend.org>
##  + Phil Pennock
## Distributed under the same BSD-ish license as zsh itself.

setopt localoptions noksharrays extendedglob NO_shwordsplit
local svnbase svnbranch a b rrn
local -A svninfo parentinfo

svnbase=".";
svninfo=()
${vcs_comm[cmd]} info --non-interactive | while IFS=: read a b; do svninfo[${a// /_}]="${b## #}"; done
while [[ -d "${svnbase}/../.svn" ]]; do
    parentinfo=()
    ${vcs_comm[cmd]} info --non-interactive "${svnbase}/.." | while IFS=: read a b; do parentinfo[${a// /_}]="${b## #}"; done
    [[ ${parentinfo[Repository_UUID]} != ${svninfo[Repository_UUID]} ]] && break
    svninfo=(${(kv)parentinfo})
    svnbase="${svnbase}/.."
done

svnbase="$(VCS_INFO_realpath ${svnbase})"

rrn=${svnbase:t}
zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" branchformat svnbranch || svnbranch="%b:%r"
zformat -f svnbranch "${svnbranch}" "b:${svninfo[URL]##*/}" "r:${svninfo[Revision]}"
VCS_INFO_formats '' "${svnbranch}" "${svnbase}" '' ''
return 0
debug log:

solving e180805 ...
found e180805 in https://git.vuxu.org/mirror/zsh/

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).