Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: _cvs update



In article <1001004101414.ZM21914@xxxxxxxxxxxxxxxxxxxxxxx>,
  "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> Anything that makes a query against the repository should respect the
> remote-access style, the way _cvs_revisions does.  You handled that in
> _cvs_(top|sub)_modules but not in _cvs_vendor_branches.

OK.  This patch do that.

However I think _cvs needs another style name to control cvs
invocation.  Because it may be slow even with local repository.
Currently,  remote-access style prevents local access as well as
remote access.  I think it's not so correct.

Index: Completion/User/_cvs
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_cvs,v
retrieving revision 1.13
diff -u -r1.13 _cvs
--- Completion/User/_cvs	2000/10/04 05:10:20	1.13
+++ Completion/User/_cvs	2000/10/04 13:48:03
@@ -744,11 +744,14 @@
 (( $+functions[_cvs_vendor_branches] )) ||
 _cvs_vendor_branches () {
   local expl vendor_branch
-  if [[ -n $opt_args[-b] ]]; then
-    _cvs_extract_vendor_branch -b "$opt_args[-b]" "$cvsroot" "$line[1]" \
-      vendor_branch
-  else
-    _cvs_extract_vendor_branch "$cvsroot" "$line[1]" vendor_branch
+  vendor_branch=()
+  if zstyle -T ":completion:${curcontext}:" remote-access; then
+    if [[ -n $opt_args[-b] ]]; then
+      _cvs_extract_vendor_branch -b "$opt_args[-b]" "$cvsroot" "$line[1]" \
+	vendor_branch
+    else
+      _cvs_extract_vendor_branch "$cvsroot" "$line[1]" vendor_branch
+    fi
   fi
   if (( $#vendor_branch )); then
     _wanted values expl 'vendor branch' compadd -a vendor_branch
-- 
Tanaka Akira



Messages sorted by: Reverse Date, Date, Thread, Author