;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-cvs.el,v 1.54 2003/04/19 22:40:18 monnier Exp $
+;; $Id: vc-cvs.el,v 1.55 2003/04/23 12:49:25 spiegel Exp $
;; This file is part of GNU Emacs.
:version "21.1"
:group 'vc)
-(defcustom vc-cvs-stay-local '(except "^\\(localhost\\)$")
+(defcustom vc-cvs-stay-local t
"*Non-nil means use local operations when possible for remote repositories.
This avoids slow queries over the network and instead uses heuristics
and past information to determine the current status of a file.
+
The value can also be a regular expression or list of regular
expressions to match against the host name of a repository; then VC
-only stays local for hosts that match it.
-This is useful in a setup, where most CVS servers should be contacted
-directly, and only a few CVS servers cannot be reached easily.
-For the opposite scenario, when only a few CVS servers are to be
-queried directly, a list of regular expressions can be specified,
-whose first element is the symbol `except'."
+only stays local for hosts that match it. Alternatively, the value
+can be a list of regular expressions where the first element is the
+symbol `except'; then VC always stays local except for hosts matched
+by these regular expressions."
:type '(choice (const :tag "Always stay local" t)
(const :tag "Don't stay local" nil)
(list :format "\nExamine hostname and %v" :tag "Examine hostname ..."
(vc-file-setprop
dirname 'vc-cvs-stay-local-p
(when (file-readable-p rootname)
- (with-temp-buffer
- (vc-insert-file rootname)
- (goto-char (point-min))
+ (with-temp-buffer
+ (vc-insert-file rootname)
+ (goto-char (point-min))
(looking-at "\\([^\n]*\\)")
(let* ((cvs-root-members
(vc-cvs-parse-root (match-string 1)))
(cdr vc-cvs-stay-local))
"\\|"))))
(if (not rx)
- 'yes
+ 'yes
(if (not (string-match rx hostname))
(setq stay-local (not stay-local)))
(if stay-local
- 'yes
+ 'yes
'no))))))))))))
- (if (eq prop 'yes) t nil))))
+ (if (eq prop 'yes) t nil))))
(defun vc-cvs-parse-root ( root )
"Split CVS ROOT specification string into a list of fields.