Mercurial > emacs
comparison lisp/vc-cvs.el @ 62606:6e91e3b4e9bc
(vc-cvs-checkout-model): Handle the case where FILE doesn't exist.
author | André Spiegel <spiegel@gnu.org> |
---|---|
date | Sun, 22 May 2005 10:29:44 +0000 |
parents | 4a2ea521d778 |
children | 6fb026ad601f 63b7247f4be6 5b029ff3b08d |
comparison
equal
deleted
inserted
replaced
62605:29ac0be69667 | 62606:6e91e3b4e9bc |
---|---|
234 (vc-cvs-registered file) | 234 (vc-cvs-registered file) |
235 (vc-file-getprop file 'vc-workfile-version)) | 235 (vc-file-getprop file 'vc-workfile-version)) |
236 | 236 |
237 (defun vc-cvs-checkout-model (file) | 237 (defun vc-cvs-checkout-model (file) |
238 "CVS-specific version of `vc-checkout-model'." | 238 "CVS-specific version of `vc-checkout-model'." |
239 (if (or (getenv "CVSREAD") | 239 (if (getenv "CVSREAD") |
240 ;; If the file is not writable (despite CVSREAD being | |
241 ;; undefined), this is probably because the file is being | |
242 ;; "watched" by other developers. | |
243 ;; (If vc-mistrust-permissions was t, we actually shouldn't | |
244 ;; trust this, but there is no other way to learn this from CVS | |
245 ;; at the moment (version 1.9).) | |
246 (string-match "r-..-..-." (nth 8 (file-attributes file)))) | |
247 'announce | 240 'announce |
248 'implicit)) | 241 (let ((attrib (file-attributes file))) |
242 (if (and attrib ;; don't check further if FILE doesn't exist | |
243 ;; If the file is not writable (despite CVSREAD being | |
244 ;; undefined), this is probably because the file is being | |
245 ;; "watched" by other developers. | |
246 ;; (If vc-mistrust-permissions was t, we actually shouldn't | |
247 ;; trust this, but there is no other way to learn this from CVS | |
248 ;; at the moment (version 1.9).) | |
249 (string-match "r-..-..-." (nth 8 attrib))) | |
250 'announce | |
251 'implicit)))) | |
249 | 252 |
250 (defun vc-cvs-mode-line-string (file) | 253 (defun vc-cvs-mode-line-string (file) |
251 "Return string for placement into the modeline for FILE. | 254 "Return string for placement into the modeline for FILE. |
252 Compared to the default implementation, this function does two things: | 255 Compared to the default implementation, this function does two things: |
253 Handle the special case of a CVS file that is added but not yet | 256 Handle the special case of a CVS file that is added but not yet |