summaryrefslogtreecommitdiff
path: root/lisp/vc-hooks.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-07-31 06:16:32 +0000
committerRichard M. Stallman <rms@gnu.org>1997-07-31 06:16:32 +0000
commit867bee3901d3525533057cd8ee8165ce632fde29 (patch)
treefd339aeed16f9ccd8307cf7a848a0afb70793b1f /lisp/vc-hooks.el
parent1812165d924be772b6e6940d23b816fa7564ced4 (diff)
downloademacs-867bee3901d3525533057cd8ee8165ce632fde29.tar.gz
(vc-checkout-model): For CVS, look at
permissions to see if a file is "watched".
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r--lisp/vc-hooks.el11
1 files changed, 10 insertions, 1 deletions
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