VCS_INFO_svn_get_data () { # {{{ setopt localoptions noksharrays local svnbase svnbranch local -a svninfo svnbase="." while [[ -d "${svnbase}/../.svn" ]]; do svnbase="${svnbase}/.." done svnbase="$(VCS_INFO_realpath ${svnbase})" svninfo=( ${${${(M)${(f)"$( svn info )"}:#(#s)(URL|Revision)*}/*: /}/*\//} ) zstyle -s ":vcs_info:${vcs}:${usercontext}" branchformat svnbranch || svnbranch="%b:%r" zformat -f svnbranch "${svnbranch}" "b:${svninfo[1]}" "r:${svninfo[2]}" VCS_INFO_formats '' "${svnbranch}" "${svnbase}" return 0 }