diff options
author | André Spiegel <spiegel@gnu.org> | 2005-05-22 10:29:44 +0000 |
---|---|---|
committer | André Spiegel <spiegel@gnu.org> | 2005-05-22 10:29:44 +0000 |
commit | ce127eaa539e56166ae94d5eafa8dbc46e44337b (patch) | |
tree | cb431adeca74fddc18718661bf22ab9171cffff3 /lisp | |
parent | 41c4895cd757ea7affdaa14e9c877435c1d6cb80 (diff) | |
download | emacs-ce127eaa539e56166ae94d5eafa8dbc46e44337b.tar.gz emacs-ce127eaa539e56166ae94d5eafa8dbc46e44337b.tar.bz2 emacs-ce127eaa539e56166ae94d5eafa8dbc46e44337b.zip |
(vc-cvs-checkout-model): Handle the case where FILE doesn't exist.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/vc-cvs.el | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 1136ce565a8..e4e9f0b0137 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el @@ -236,16 +236,19 @@ See also variable `vc-cvs-sticky-date-format-string'." (defun vc-cvs-checkout-model (file) "CVS-specific version of `vc-checkout-model'." - (if (or (getenv "CVSREAD") - ;; If the file is not writable (despite CVSREAD being - ;; undefined), this is probably because the file is being - ;; "watched" by other developers. - ;; (If vc-mistrust-permissions was t, we actually shouldn't - ;; trust this, but there is no other way to learn this from CVS - ;; at the moment (version 1.9).) - (string-match "r-..-..-." (nth 8 (file-attributes file)))) + (if (getenv "CVSREAD") 'announce - 'implicit)) + (let ((attrib (file-attributes file))) + (if (and attrib ;; don't check further if FILE doesn't exist + ;; If the file is not writable (despite CVSREAD being + ;; undefined), this is probably because the file is being + ;; "watched" by other developers. + ;; (If vc-mistrust-permissions was t, we actually shouldn't + ;; trust this, but there is no other way to learn this from CVS + ;; at the moment (version 1.9).) + (string-match "r-..-..-." (nth 8 attrib))) + 'announce + 'implicit)))) (defun vc-cvs-mode-line-string (file) "Return string for placement into the modeline for FILE. |