Mercurial > emacs
comparison lisp/vc-hooks.el @ 12359:6da25b126f03
(vc-fetch-master-properties): Pass an absolute
pathname to the cvs status command. This is required to make
recursive vc-directory listings work.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 22 Jun 1995 16:23:52 +0000 |
parents | 2e2af003b9c5 |
children | f268f652055e |
comparison
equal
deleted
inserted
replaced
12358:fe8779b08103 | 12359:6da25b126f03 |
---|---|
35 ;; Customization Variables (the rest is in vc.el) | 35 ;; Customization Variables (the rest is in vc.el) |
36 | 36 |
37 (defvar vc-default-back-end nil | 37 (defvar vc-default-back-end nil |
38 "*Back-end actually used by this interface; may be SCCS or RCS. | 38 "*Back-end actually used by this interface; may be SCCS or RCS. |
39 The value is only computed when needed to avoid an expensive search.") | 39 The value is only computed when needed to avoid an expensive search.") |
40 | |
41 (defvar vc-handle-cvs t | |
42 "*If non-nil, use VC for files managed with CVS. | |
43 If it is nil, don't use VC for those files.") | |
40 | 44 |
41 (defvar vc-path | 45 (defvar vc-path |
42 (if (file-directory-p "/usr/sccs") | 46 (if (file-directory-p "/usr/sccs") |
43 '("/usr/sccs") | 47 '("/usr/sccs") |
44 nil) | 48 nil) |
283 (cons (concat "PATH=" (getenv "PATH") | 287 (cons (concat "PATH=" (getenv "PATH") |
284 path-separator | 288 path-separator |
285 (mapconcat 'identity vc-path path-separator)) | 289 (mapconcat 'identity vc-path path-separator)) |
286 process-environment))) | 290 process-environment))) |
287 (apply 'call-process "cvs" nil "*vc-info*" nil | 291 (apply 'call-process "cvs" nil "*vc-info*" nil |
288 (list "status" (file-name-nondirectory file)))) | 292 (list "status" file))) |
289 (set-buffer (get-buffer "*vc-info*")) | 293 (set-buffer (get-buffer "*vc-info*")) |
290 (set-buffer-modified-p nil) | 294 (set-buffer-modified-p nil) |
291 (auto-save-mode nil) | 295 (auto-save-mode nil) |
292 (vc-parse-buffer | 296 (vc-parse-buffer |
293 ;; CVS 1.3 says "RCS Version:", other releases "RCS Revision:", | 297 ;; CVS 1.3 says "RCS Version:", other releases "RCS Revision:", |
648 ;; If it is, do a (throw 'found (cons MASTER 'CVS)). | 652 ;; If it is, do a (throw 'found (cons MASTER 'CVS)). |
649 ;; Note: If the file is ``cvs add''ed but not yet ``cvs commit''ed | 653 ;; Note: If the file is ``cvs add''ed but not yet ``cvs commit''ed |
650 ;; the MASTER will not actually exist yet. The other parts of VC | 654 ;; the MASTER will not actually exist yet. The other parts of VC |
651 ;; checks for this condition. This function returns nil if | 655 ;; checks for this condition. This function returns nil if |
652 ;; DIRNAME/BASENAME is not handled by CVS. | 656 ;; DIRNAME/BASENAME is not handled by CVS. |
653 (if (and (file-directory-p (concat dirname "CVS/")) | 657 (if (and vc-handle-cvs |
658 (file-directory-p (concat dirname "CVS/")) | |
654 (file-readable-p (concat dirname "CVS/Entries")) | 659 (file-readable-p (concat dirname "CVS/Entries")) |
655 (file-readable-p (concat dirname "CVS/Repository"))) | 660 (file-readable-p (concat dirname "CVS/Repository"))) |
656 (let ((bufs nil) (fold case-fold-search)) | 661 (let ((bufs nil) (fold case-fold-search)) |
657 (unwind-protect | 662 (unwind-protect |
658 (save-excursion | 663 (save-excursion |