about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-04-13 08:13:04 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-04-13 08:13:04 +0000
commit8020750b3c8ac68dcd7d402a5aa9751fabd26704 (patch)
treea81ae3b75a8531f2ccda382579b75bb7b4d4b17e
parent97827c1bf5e90f9c510130c21ed71825f7f2967b (diff)
downloadzsh-8020750b3c8ac68dcd7d402a5aa9751fabd26704.tar.gz
zsh-8020750b3c8ac68dcd7d402a5aa9751fabd26704.tar.xz
zsh-8020750b3c8ac68dcd7d402a5aa9751fabd26704.zip
gi1242+zsh: 28991: fix _svn caching policy
-rw-r--r--ChangeLog7
-rw-r--r--Completion/Unix/Command/_subversion15
2 files changed, 11 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f668d2c4..1bd8f3045 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-13  Peter Stephenson  <pws@csr.com>
+
+	* gi1242+zsh: 28991: Completion/Unix/Command/_subversion: fix
+	caching policy for subversion.
+
 2011-04-12  Peter Stephenson  <pws@csr.com>
 
 	* Valentin Ochs: 28990: configure.ac, Src/system.h: more
@@ -14441,5 +14446,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5245 $
+* $Revision: 1.5246 $
 *****************************************************
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index 44d83b7fe..88142d805 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -18,11 +18,11 @@ _svn () {
 
   if [[ -n $state ]] && (( ! $+_svn_cmds )); then
     typeset -gHA _svn_cmds
-    if ! _cache_invalid svn_cmds && ! _retrieve_cache svn_cmds; then 
+    if _cache_invalid svn-cmds || ! _retrieve_cache svn-cmds; then 
       _svn_cmds=(
 	${=${(f)${${"$(LC_ALL=C _call_program commands svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
       )
-      _store_cache svn_cmds _svn_cmds
+      _store_cache svn-cmds _svn_cmds
     fi
   fi
 
@@ -38,13 +38,13 @@ _svn () {
       if (( $#cmd )); then
         curcontext="${curcontext%:*:*}:svn-${cmd}:"
 
-	if ! _cache_invalid svn-${cmd}-usage && \
+	if _cache_invalid svn-${cmd}-usage || \
 	    ! _retrieve_cache svn-${cmd}-usage;
 	then
 	  usage=${${(M)${(f)"$(LC_ALL=C _call_program options svn help $cmd)"}:#usage:*}#usage:*$cmd] }
 	  _store_cache svn-${cmd}-usage usage
 	fi
-	if ! _cache_invalid svn-${cmd}-usage && \
+	if _cache_invalid svn-${cmd}-usage || \
 	    ! _retrieve_cache svn-${cmd}-args;
 	then
 	  args=(
@@ -317,12 +317,7 @@ _subversion () {
 }
 
 _svn_caching_policy() {
-  # Rebuild every week
-  local -a oldp
-
-  oldp=( "$1"(Nmw+1) )
-  (( $#oldp ))
+  [[ =$service -nt $1 ]]
 }
 
-
 _subversion "$@"