]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-cvs-parse-entry): Don't barf when an `Entries' files contains an
authorMiles Bader <miles@gnu.org>
Fri, 11 Oct 2002 06:49:49 +0000 (06:49 +0000)
committerMiles Bader <miles@gnu.org>
Fri, 11 Oct 2002 06:49:49 +0000 (06:49 +0000)
invalid timestamp.

lisp/ChangeLog
lisp/vc-cvs.el

index 7aff48aa8e611b297175ab1cd53ed38b764dba35..91f9cbb3e473892bca0704f4f6d7f095a83b0d1e 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-11  Miles Bader  <miles@gnu.org>
+
+       * vc-cvs.el (vc-cvs-parse-entry): Don't barf when an `Entries'
+       files contains an invalid timestamp.
+
 2002-10-11  Simon Josefsson  <jas@extundo.com>
 
        * mail/sendmail.el (mail-envelope-from): New option `header' to
index f9d414521330873568d682af06d5efcd29cdaa84..f9059a9ce488eab3a5cae580b0d33eeb642a3677 100644 (file)
@@ -1,11 +1,11 @@
 ;;; vc-cvs.el --- non-resident support for CVS version-control
 
-;; Copyright (C) 1995,98,99,2000,2001  Free Software Foundation, Inc.
+;; Copyright (C) 1995,98,99,2000,2001,2002  Free Software Foundation, Inc.
 
 ;; Author:      FSF (see vc.el for full credits)
 ;; Maintainer:  Andre Spiegel <spiegel@gnu.org>
 
-;; $Id: vc-cvs.el,v 1.46 2002/10/09 15:59:39 rost Exp $
+;; $Id: vc-cvs.el,v 1.47 2002/10/10 08:44:58 spiegel Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -884,15 +884,15 @@ is non-nil."
     ;; compare checkout time and modification time
     (let ((mtime (nth 5 (file-attributes file))))
       (require 'parse-time)
-      (cond ((equal mtime
-                    (apply 'encode-time
-                           (parse-time-string 
-                            (concat (match-string 2) " +0000"))))
-            (vc-file-setprop file 'vc-checkout-time mtime)
-            (if set-state (vc-file-setprop file 'vc-state 'up-to-date)))
-           (t
-            (vc-file-setprop file 'vc-checkout-time 0)
-            (if set-state (vc-file-setprop file 'vc-state 'edited))))))))
+      (let ((parsed-time
+            (parse-time-string (concat (match-string 2) " +0000"))))
+       (cond ((and (car parsed-time)
+                   (equal mtime (apply 'encode-time parsed-time)))
+              (vc-file-setprop file 'vc-checkout-time mtime)
+              (if set-state (vc-file-setprop file 'vc-state 'up-to-date)))
+             (t
+              (vc-file-setprop file 'vc-checkout-time 0)
+              (if set-state (vc-file-setprop file 'vc-state 'edited)))))))))
 
 (provide 'vc-cvs)