Index: Completion/Unix/Command/_subversion =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_subversion,v retrieving revision 1.26 diff -u -r1.26 _subversion --- Completion/Unix/Command/_subversion 17 May 2009 18:23:10 -0000 1.26 +++ Completion/Unix/Command/_subversion 18 May 2009 02:19:15 -0000 @@ -22,7 +22,7 @@ ;; args) local cmd args usage - typeset -gHA _cache_svn_status + typeset -gHA _cache_svn_status _cache_svn_mtime cmd="${${(k)_svn_cmds[(R)*:$words[1]:*]}:-${(k)_svn_cmds[(i):$words[1]:]}}" if (( $#cmd )); then @@ -193,11 +193,16 @@ local dir=$REPLY:h local pat="${1:-([ADMR~]|?M)}" - if (( ! $+_cache_svn_status[$dir] )); then - _cache_svn_status[$dir]="$(_call_program files svn status -N $dir)" + zmodload -F zsh/stat b:zstat 2>/dev/null + local key="$(zstat +device $dir):$(zstat +inode $dir)" + local mtime="$(zstat +mtime $dir/.svn/entries)" + + if (( ! $+_cache_svn_status[$key] || _cache_svn_mtime[$key] != mtime )); then + _cache_svn_status[$key]="$(_call_program files svn status -N $dir)" + _cache_svn_mtime[$key]="$mtime" fi - (( ${(M)#${(f)_cache_svn_status[$dir]}:#(#s)${~pat}*$REPLY} )) + (( ${(M)#${(f)_cache_svn_status[$key]}:#(#s)${~pat}*$REPLY} )) } (( $+functions[_svn_urls] )) ||