]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-rcs-state-heuristic): Don't assume the file exists.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 11 Jun 2008 15:55:55 +0000 (15:55 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 11 Jun 2008 15:55:55 +0000 (15:55 +0000)
lisp/ChangeLog
lisp/vc-rcs.el

index 2d1c1a0e7983f9ec1f94379ecf77998ec50424d2..41bf73f51390de875595e8c4288f57450db3e803 100644 (file)
@@ -1,3 +1,7 @@
+2008-06-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * vc-rcs.el (vc-rcs-state-heuristic): Don't assume the file exists.
+
 2008-06-11  Glenn Morris  <rgm@gnu.org>
 
        * progmodes/fortran.el (fortran-end-of-subprogram): Check for a match
index 0bda1e7c6aaf23aaf7b68e9c24c0c2ebfbb91486..9d0550880ce2c0ff97329d0080468713223b1b06 100644 (file)
@@ -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