1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-08-13 15:41:01 +02:00

30046: VCS_INFO_get_data_svn: Fix support for subversion version 1.7

This commit is contained in:
Frank Terbeck 2011-12-30 13:32:51 +00:00
parent 30c98aa87e
commit ee03cac7fe
2 changed files with 23 additions and 2 deletions
ChangeLog
Functions/VCS_Info/Backends

View file

@ -1,3 +1,8 @@
2011-12-30 Frank Terbeck <ft@bewatermyfriend.org>
* 30046: Functions/VCS_Info/Backends/VCS_INFO_get_data_svn: Fix
support for subversion version 1.7.
2011-12-27 Barton E. Schaefer <schaefer@zsh.org>
* 30069: Doc/Zsh/options.yo: replace empty parens with
@ -15796,5 +15801,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.5549 $
* $Revision: 1.5550 $
*****************************************************

View file

@ -6,12 +6,28 @@
setopt localoptions noksharrays extendedglob NO_shwordsplit
local svnbase svnbranch a b rrn
local -i rc
local -A svninfo parentinfo
local -xA hook_com
svnbase=".";
svninfo=()
${vcs_comm[cmd]} info --non-interactive | while IFS=: read a b; do svninfo[${a// /_}]="${b## #}"; done
# 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
while [[ -d "${svnbase}/../.svn" ]]; do
parentinfo=()
${vcs_comm[cmd]} info --non-interactive "${svnbase}/.." | while IFS=: read a b; do parentinfo[${a// /_}]="${b## #}"; done