/[emacs]/emacs/lisp/vc-cvs.el
ViewVC logotype

Diff of /emacs/lisp/vc-cvs.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55 by spiegel, Wed Apr 23 12:49:25 2003 UTC revision 1.56 by spiegel, Wed Apr 23 13:14:16 2003 UTC
# Line 81  This is only meaningful if you don't use Line 81  This is only meaningful if you don't use
81    :version "21.1"    :version "21.1"
82    :group 'vc)    :group 'vc)
83    
84  (defcustom vc-cvs-stay-local '(except "^\\(localhost\\)$")  (defcustom vc-cvs-stay-local t
85    "*Non-nil means use local operations when possible for remote repositories.    "*Non-nil means use local operations when possible for remote repositories.
86  This avoids slow queries over the network and instead uses heuristics  This avoids slow queries over the network and instead uses heuristics
87  and past information to determine the current status of a file.  and past information to determine the current status of a file.
88    
89  The value can also be a regular expression or list of regular  The value can also be a regular expression or list of regular
90  expressions to match against the host name of a repository; then VC  expressions to match against the host name of a repository; then VC
91  only stays local for hosts that match it.  only stays local for hosts that match it.  Alternatively, the value
92  This is useful in a setup, where most CVS servers should be contacted  can be a list of regular expressions where the first element is the
93  directly, and only a few CVS servers cannot be reached easily.  symbol `except'; then VC always stays local except for hosts matched
94  For the opposite scenario, when only a few CVS servers are to be  by these regular expressions."
 queried directly, a list of regular expressions can be specified,  
 whose first element is the symbol `except'."  
95    :type '(choice (const :tag "Always stay local" t)    :type '(choice (const :tag "Always stay local" t)
96                  (const :tag "Don't stay local" nil)                  (const :tag "Don't stay local" nil)
97                   (list :format "\nExamine hostname and %v" :tag "Examine hostname ..."                   (list :format "\nExamine hostname and %v" :tag "Examine hostname ..."
# Line 736  See `vc-cvs-stay-local'." Line 735  See `vc-cvs-stay-local'."
735                      (vc-file-setprop                      (vc-file-setprop
736                       dirname 'vc-cvs-stay-local-p                       dirname 'vc-cvs-stay-local-p
737                       (when (file-readable-p rootname)                       (when (file-readable-p rootname)
738                        (with-temp-buffer                         (with-temp-buffer
739                          (vc-insert-file rootname)                           (vc-insert-file rootname)
740                          (goto-char (point-min))                           (goto-char (point-min))
741                           (looking-at "\\([^\n]*\\)")                           (looking-at "\\([^\n]*\\)")
742                           (let* ((cvs-root-members                           (let* ((cvs-root-members
743                                   (vc-cvs-parse-root (match-string 1)))                                   (vc-cvs-parse-root (match-string 1)))
# Line 763  See `vc-cvs-stay-local'." Line 762  See `vc-cvs-stay-local'."
762                                               (cdr vc-cvs-stay-local))                                               (cdr vc-cvs-stay-local))
763                                             "\\|"))))                                             "\\|"))))
764                                 (if (not rx)                                 (if (not rx)
765                                  'yes                                     'yes
766                                   (if (not (string-match rx hostname))                                   (if (not (string-match rx hostname))
767                                       (setq stay-local (not stay-local)))                                       (setq stay-local (not stay-local)))
768                                   (if stay-local                                   (if stay-local
769                                      'yes                                       'yes
770                                     'no))))))))))))                                     'no))))))))))))
771         (if (eq prop 'yes) t nil))))          (if (eq prop 'yes) t nil))))
772    
773  (defun vc-cvs-parse-root ( root )  (defun vc-cvs-parse-root ( root )
774    "Split CVS ROOT specification string into a list of fields.    "Split CVS ROOT specification string into a list of fields.

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26