Server IP : 51.89.169.208 / Your IP : 216.73.216.211 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/proc/thread-self/root/usr/share/zsh/5.5.1/functions/ |
Upload File : |
## 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 -i rc local -A svninfo parentinfo cwdinfo local -A hook_com svnbase="."; svninfo=() # Unfortunately, `$pipestatus' is broken currently. Until that problem is # resolved, here is a workaround that will get things done, without using it. # Clumsily, but that's life. local -a dat dat=( ${(f)"$(${vcs_comm[cmd]} info --non-interactive 2>&1)"} ) rc=$? (( rc != 0 )) && return 1 # The following line is the real code, the following is the workaround. #${vcs_comm[cmd]} info --non-interactive \ print -l "${dat[@]}" \ |& while IFS=: read a b; do svninfo[${a// /_}]="${b## #}" done #rc=${pipestatus[1]} #(( rc != 0 )) && return 1 cwdinfo=(${(kv)svninfo}) # Set svnbase to the wcroot path and svninfo to its `svn info`. if (( ${+svninfo[Working_Copy_Root_Path]} )); then # svn 1.7+ svnbase=${svninfo[Working_Copy_Root_Path]} ${vcs_comm[cmd]} info --non-interactive -- "${svnbase}" | while IFS=: read a b; do svninfo[${a// /_}]="${b## #}"; done else # svn 1.0-1.6 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 fi svnbase="$(VCS_INFO_realpath ${svnbase})" rrn=${svnbase:t} zstyle -s ":vcs_info:${vcs}:${usercontext}:${rrn}" branchformat svnbranch || svnbranch="%b:%r" hook_com=( branch "${svninfo[URL]##*/}" revision "${cwdinfo[Revision]}" ) if VCS_INFO_hook 'set-branch-format' "${svnbranch}"; then zformat -f svnbranch "${svnbranch}" "b:${hook_com[branch]}" "r:${hook_com[revision]}" else svnbranch=${hook_com[branch-replace]} fi hook_com=() VCS_INFO_formats '' "${svnbranch}" "${svnbase}" '' '' "${cwdinfo[Revision]}" '' return 0