changeset 13034:1f9b08a989ea

(vc-fetch-master-properties): Call "cvs status" in the right directory, passing only the nondirectory part of the file name. (vc-find-cvs-master): Bind `mtime' locally instead of using it as a free variable.
author André Spiegel <spiegel@gnu.org>
date Thu, 14 Sep 1995 07:23:43 +0000
parents 216edf9576ea
children b8453eab5114
files lisp/vc-hooks.el
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc-hooks.el	Tue Sep 12 23:20:42 1995 +0000
+++ b/lisp/vc-hooks.el	Thu Sep 14 07:23:43 1995 +0000
@@ -311,7 +311,11 @@
 
      ((eq (vc-backend file) 'CVS)
       (save-excursion
-	(vc-simple-command 0 "cvs" file "status")
+        ;; Call "cvs status" in the right directory, passing only the
+        ;; nondirectory part of the file name -- otherwise CVS might 
+        ;; silently give a wrong result.
+        (let ((default-directory (file-name-directory file)))
+          (vc-simple-command 0 "cvs" (file-name-nondirectory file) "status"))
 	(set-buffer (get-buffer "*vc-info*"))
 	(vc-parse-buffer     
 	 ;; CVS 1.3 says "RCS Version:", other releases "RCS Revision:",
@@ -778,10 +782,10 @@
 				 (match-string 1))
 		;; If the file hasn't been modified since checkout,
 		;; store the checkout-time.
-		(setq mtime (nth 5 (file-attributes file)))
-		(if (string= (match-string 2) (vc-utc-string mtime))
-		    (vc-file-setprop file 'vc-checkout-time mtime)
-		  (vc-file-setprop file 'vc-checkout-time 0))
+		(let ((mtime (nth 5 (file-attributes file))))
+		  (if (string= (match-string 2) (vc-utc-string mtime))
+		      (vc-file-setprop file 'vc-checkout-time mtime)
+		    (vc-file-setprop file 'vc-checkout-time 0)))
 		(throw 'found (cons (concat dirname "CVS/Entries") 'CVS)))
 	       (t (setq case-fold-search fold)  ;; restore the old value
 		  nil)))