From: Stefan Monnier Date: Wed, 11 Jun 2008 15:55:55 +0000 (+0000) Subject: (vc-rcs-state-heuristic): Don't assume the file exists. X-Git-Tag: emacs-pretest-23.0.90~4876 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f7ed19a3eea686986704220f2ca7295e2fbf8d44;p=emacs.git (vc-rcs-state-heuristic): Don't assume the file exists. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2d1c1a0e798..41bf73f5139 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-06-11 Stefan Monnier + + * vc-rcs.el (vc-rcs-state-heuristic): Don't assume the file exists. + 2008-06-11 Glenn Morris * 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'." ;; permissions can tell us whether locking is used for ;; the file or not. (if (and (eq state 'up-to-date) - (not (vc-mistrust-permissions file))) + (not (vc-mistrust-permissions file)) + (file-exists-p file)) (cond ((string-match ".rw..-..-." (nth 8 (file-attributes file))) (vc-file-setprop file 'vc-checkout-model 'implicit) @@ -170,10 +171,10 @@ For a description of possible values, see `vc-check-master-templates'." (let* ((attributes (file-attributes file 'string)) (owner-name (nth 2 attributes)) (permissions (nth 8 attributes))) - (cond ((string-match ".r-..-..-." permissions) + (cond ((and permissions (string-match ".r-..-..-." permissions)) (vc-file-setprop file 'vc-checkout-model 'locking) 'up-to-date) - ((string-match ".rw..-..-." permissions) + ((and permissions (string-match ".rw..-..-." permissions)) (if (eq (vc-rcs-checkout-model file) 'locking) (if (file-ownership-preserved-p file) 'edited