From 403d549cb7cdf070291c6d3a39172661b21390e8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 31 Jul 1997 06:16:32 +0000 Subject: [PATCH] (vc-checkout-model): For CVS, look at permissions to see if a file is "watched". --- lisp/vc-hooks.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 0cdfb82be7c..b775e89cbfe 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -514,7 +514,16 @@ For CVS, the full name of CVS/Entries is returned." (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 -- 2.39.2