# HG changeset patch # User Stefan Monnier # Date 1213199755 0 # Node ID 85ee8c71ce8c6c33aac35be82f8dea06d07fb12e # Parent 27e773c9952b1642aaccd784fae5c02624a6124e (vc-rcs-state-heuristic): Don't assume the file exists. diff -r 27e773c9952b -r 85ee8c71ce8c lisp/ChangeLog --- a/lisp/ChangeLog Wed Jun 11 06:00:36 2008 +0000 +++ b/lisp/ChangeLog Wed Jun 11 15:55:55 2008 +0000 @@ -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 -r 27e773c9952b -r 85ee8c71ce8c lisp/vc-rcs.el --- a/lisp/vc-rcs.el Wed Jun 11 06:00:36 2008 +0000 +++ b/lisp/vc-rcs.el Wed Jun 11 15:55:55 2008 +0000 @@ -155,7 +155,8 @@ ;; 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 @@ (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