Fix file time stamp problem with bzr and CVS (Bug#12001).
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 24 Aug 2012 04:05:25 +0000 (21:05 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 24 Aug 2012 04:05:25 +0000 (21:05 -0700)
* vc/vc-cvs.el (vc-cvs-parse-entry): Ignore subsecond information
in the file's time stamp, since the version control system loses
that information.

lisp/ChangeLog
lisp/vc/vc-cvs.el

index c92691b..5236ad5 100644 (file)
@@ -1,3 +1,10 @@
+2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix file time stamp problem with bzr and CVS (Bug#12001).
+       * vc/vc-cvs.el (vc-cvs-parse-entry): Ignore subsecond information
+       in the file's time stamp, since the version control system loses
+       that information.
+
 2012-08-22  Juri Linkov  <juri@jurta.org>
 
        * info.el (Info-fontify-node): Hide the suffix of the
index 2a67262..c1c4b75 100644 (file)
@@ -1178,7 +1178,11 @@ is non-nil."
                                (parse-time-string (concat time " +0000")))))
       (cond ((and (not (string-match "\\+" time))
                   (car parsed-time)
-                  (equal mtime (apply 'encode-time parsed-time)))
+                  ;; Compare just the seconds part of the file time,
+                  ;; since CVS file time stamp resolution is just 1 second.
+                  (let ((ptime (apply 'encode-time parsed-time)))
+                    (and (eq (car mtime) (car ptime))
+                         (eq (cadr mtime) (cadr ptime)))))
              (vc-file-setprop file 'vc-checkout-time mtime)
              (if set-state (vc-file-setprop file 'vc-state 'up-to-date)))
             (t