From: André Spiegel Date: Thu, 14 Sep 1995 07:23:43 +0000 (+0000) Subject: (vc-fetch-master-properties): Call "cvs status" in the right X-Git-Tag: emacs-19.34~2826 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=719dcee97be039c172f09635de2392cdf8834200;p=emacs.git (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. --- diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 1e4db196e84..a17e2617840 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -311,7 +311,11 @@ value of this flag.") ((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 @@ For CVS, the full name of CVS/Entries is returned." (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)))