emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v


From: Dan Nicolaescu
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,v
Date: Mon, 13 Oct 2008 01:16:59 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Dan Nicolaescu <dann>   08/10/13 01:16:56

Index: vc-cvs.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-cvs.el,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -b -r1.152 -r1.153
--- vc-cvs.el   9 Oct 2008 04:52:32 -0000       1.152
+++ vc-cvs.el   13 Oct 2008 01:16:55 -0000      1.153
@@ -105,11 +105,15 @@
   :version "21.1"
   :group 'vc)
 
-(defcustom vc-cvs-stay-local t
+(defcustom vc-cvs-stay-local 'only-file
   "*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.
 
+If value is the symbol `only-file' `vc-dir' will connect to the
+server, but heuristics will be used to determine the status for
+all other VC operations.
+
 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.  Alternatively, the value
@@ -117,19 +121,12 @@
 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 "Only for file operations" 'only-file)
                 (const :tag "Don't stay local" nil)
                  (list :format "\nExamine hostname and %v" :tag "Examine 
hostname ..."
                        (set :format "%v" :inline t (const :format "%t" :tag 
"don't" except))
                        (regexp :format " stay local,\n%t: %v" :tag "if it 
matches")
                        (repeat :format "%v%i\n" :inline t (regexp :tag "or"))))
-  :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)
 
@@ -961,7 +958,8 @@
 (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-cvs-dir-stay-local
+  (let ((local (vc-stay-local-p dir)))
+    (if (and local (not (eq local 'only-file)))
       (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
@@ -970,7 +968,7 @@
     ;;                   (file-relative-name dir)
     ;;                   "-f" "-n" "update" "-d" "-P")
     (vc-exec-after
-     `(vc-cvs-after-dir-status (quote ,update-function)))))
+       `(vc-cvs-after-dir-status (quote ,update-function))))))
 
 (defun vc-cvs-dir-status-files (dir files default-state update-function)
   "Create a list of conses (file . state) for DIR."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]