changeset 19054:e5c297c50838

(vc-checkout-model): For CVS, look at permissions to see if a file is "watched".
author Richard M. Stallman <rms@gnu.org>
date Thu, 31 Jul 1997 06:16:32 +0000
parents 7b5642657857
children 5439070e5d46
files lisp/vc-hooks.el
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc-hooks.el	Thu Jul 31 06:08:07 1997 +0000
+++ b/lisp/vc-hooks.el	Thu Jul 31 06:16:32 1997 +0000
@@ -514,7 +514,16 @@
 		(vc-file-getprop file 'vc-checkout-model))))
     ((eq (vc-backend file) 'CVS)
      (vc-file-setprop file 'vc-checkout-model
-		      (if (getenv "CVSREAD") 'manual 'implicit))))))
+      (cond
+       ((getenv "CVSREAD") 'manual)
+       ;; If the file is not writeable, this is probably because the
+       ;; file is being "watched" by other developers.  Use "manual"
+       ;; checkout in this case.  (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)))
+        'manual)
+       (t 'implicit)))))))
 
 ;;; properties indicating the locking state