summaryrefslogtreecommitdiff
path: root/lisp/vc-hooks.el
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>1995-09-14 07:23:43 +0000
committerAndré Spiegel <spiegel@gnu.org>1995-09-14 07:23:43 +0000
commit47e699159cbaac33e7c5f9644d99b4a6a74fb1a5 (patch)
treed1a30ed82be5b3bca306e63e6608d37f3df4114a /lisp/vc-hooks.el
parentf09f702c41ed0c170c106acc984e4c51292d3497 (diff)
downloademacs-47e699159cbaac33e7c5f9644d99b4a6a74fb1a5.tar.gz
(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.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r--lisp/vc-hooks.el14
1 files changed, 9 insertions, 5 deletions
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)))