From ee03cac7fea67062eff3340b018b8d38c35f6a95 Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Fri, 30 Dec 2011 13:32:51 +0000 Subject: 30046: VCS_INFO_get_data_svn: Fix support for subversion version 1.7 --- Functions/VCS_Info/Backends/VCS_INFO_get_data_svn | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Functions/VCS_Info') diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn b/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn index b1cb7302b..41cc3e783 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_svn @@ -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 -- cgit v1.2.3 From 0d15215d86737a93a7ee284bc8f25b19ecabbe7f Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Thu, 19 Jan 2012 16:57:40 +0000 Subject: 30114: VCS_INFO_check_com: Remove a superfluous stat() --- ChangeLog | 7 ++++++- Functions/VCS_Info/VCS_INFO_check_com | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'Functions/VCS_Info') diff --git a/ChangeLog b/ChangeLog index cf82ae205..159b0b7b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-01-19 Frank Terbeck + + * 30114: Functions/VCS_Info/VCS_INFO_check_com: Remove a + superfluous stat(). + 2012-01-16 Frank Terbeck * 30111: Src/exec.c: Fix segfaults with exec options. @@ -15865,5 +15870,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5563 $ +* $Revision: 1.5564 $ ***************************************************** diff --git a/Functions/VCS_Info/VCS_INFO_check_com b/Functions/VCS_Info/VCS_INFO_check_com index d9f7a1330..1b86593a1 100644 --- a/Functions/VCS_Info/VCS_INFO_check_com +++ b/Functions/VCS_Info/VCS_INFO_check_com @@ -9,7 +9,7 @@ case $1 in [[ -x $1 ]] && return 0 ;; (*) - (( ${+commands[$1]} )) && [[ -x ${commands[$1]} ]] && return 0 + (( ${+commands[$1]} )) && return 0 esac return 1 -- cgit v1.2.3