changeset 98576:5472a993dc3a

(vc-cvs-dir-stay-local): New variable. (vc-cvs-dir-status): Use it.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 09 Oct 2008 04:52:28 +0000
parents 7e4ece224094
children 457b5cef3f44
files lisp/ChangeLog lisp/vc-cvs.el
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Oct 08 22:59:02 2008 +0000
+++ b/lisp/ChangeLog	Thu Oct 09 04:52:28 2008 +0000
@@ -1,3 +1,8 @@
+2008-10-09  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* vc-cvs.el (vc-cvs-dir-stay-local): New variable.
+	(vc-cvs-dir-status): Use it.
+
 2008-10-08  Chong Yidong  <cyd@stupidchicken.com>
 
 	* json.el (json-skip-whitespace): Fix last change.
--- a/lisp/vc-cvs.el	Wed Oct 08 22:59:02 2008 +0000
+++ b/lisp/vc-cvs.el	Thu Oct 09 04:52:28 2008 +0000
@@ -125,6 +125,14 @@
   :version "21.1"
   :group 'vc)
 
+(defcustom vc-cvs-dir-stay-local nil
+  "*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 files for `vc-dir'."
+  :type 'boolean
+  :version "23.1"
+  :group 'vc)
+
 (defcustom vc-cvs-sticky-date-format-string "%c"
   "*Format string for mode-line display of sticky date.
 Format is according to `format-time-string'.  Only used if
@@ -953,7 +961,7 @@
 (defun vc-cvs-dir-status (dir update-function)
   "Create a list of conses (file . state) for DIR."
   ;; FIXME check all files in DIR instead?
-  (if (vc-stay-local-p dir)
+  (if vc-cvs-dir-stay-local
       (vc-cvs-dir-status-heuristic dir update-function)
     (vc-cvs-command (current-buffer) 'async dir "-f" "status")
     ;; Alternative implementation: use the "update" command instead of