aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-06-11 15:55:55 +0000
committerStefan Monnier2008-06-11 15:55:55 +0000
commitf7ed19a3eea686986704220f2ca7295e2fbf8d44 (patch)
tree5c83a6e962ef78780264b5c412655f1666de4068
parent32a7e53cb36166c5ee44bed32520966307d62679 (diff)
downloademacs-f7ed19a3eea686986704220f2ca7295e2fbf8d44.tar.gz
emacs-f7ed19a3eea686986704220f2ca7295e2fbf8d44.zip
(vc-rcs-state-heuristic): Don't assume the file exists.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/vc-rcs.el7
2 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2d1c1a0e798..41bf73f5139 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12008-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * vc-rcs.el (vc-rcs-state-heuristic): Don't assume the file exists.
4
12008-06-11 Glenn Morris <rgm@gnu.org> 52008-06-11 Glenn Morris <rgm@gnu.org>
2 6
3 * progmodes/fortran.el (fortran-end-of-subprogram): Check for a match 7 * progmodes/fortran.el (fortran-end-of-subprogram): Check for a match
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el
index 0bda1e7c6aa..9d0550880ce 100644
--- a/lisp/vc-rcs.el
+++ b/lisp/vc-rcs.el
@@ -155,7 +155,8 @@ For a description of possible values, see `vc-check-master-templates'."
155 ;; permissions can tell us whether locking is used for 155 ;; permissions can tell us whether locking is used for
156 ;; the file or not. 156 ;; the file or not.
157 (if (and (eq state 'up-to-date) 157 (if (and (eq state 'up-to-date)
158 (not (vc-mistrust-permissions file))) 158 (not (vc-mistrust-permissions file))
159 (file-exists-p file))
159 (cond 160 (cond
160 ((string-match ".rw..-..-." (nth 8 (file-attributes file))) 161 ((string-match ".rw..-..-." (nth 8 (file-attributes file)))
161 (vc-file-setprop file 'vc-checkout-model 'implicit) 162 (vc-file-setprop file 'vc-checkout-model 'implicit)
@@ -170,10 +171,10 @@ For a description of possible values, see `vc-check-master-templates'."
170 (let* ((attributes (file-attributes file 'string)) 171 (let* ((attributes (file-attributes file 'string))
171 (owner-name (nth 2 attributes)) 172 (owner-name (nth 2 attributes))
172 (permissions (nth 8 attributes))) 173 (permissions (nth 8 attributes)))
173 (cond ((string-match ".r-..-..-." permissions) 174 (cond ((and permissions (string-match ".r-..-..-." permissions))
174 (vc-file-setprop file 'vc-checkout-model 'locking) 175 (vc-file-setprop file 'vc-checkout-model 'locking)
175 'up-to-date) 176 'up-to-date)
176 ((string-match ".rw..-..-." permissions) 177 ((and permissions (string-match ".rw..-..-." permissions))
177 (if (eq (vc-rcs-checkout-model file) 'locking) 178 (if (eq (vc-rcs-checkout-model file) 'locking)
178 (if (file-ownership-preserved-p file) 179 (if (file-ownership-preserved-p file)
179 'edited 180 'edited