# HG changeset patch # User Richard M. Stallman # Date 870329792 0 # Node ID e5c297c50838000099259e1148bd7c9b9503ec34 # Parent 7b5642657857654607021003b5e1264eeea2b004 (vc-checkout-model): For CVS, look at permissions to see if a file is "watched". diff -r 7b5642657857 -r e5c297c50838 lisp/vc-hooks.el --- 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