]> git.eshelyaron.com Git - emacs.git/commitdiff
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 c92691b64b833cc2a3393a4b73afae7f851cfa83..5236ad559038c616fb3add16e2cd8d6c725c178c 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 2a672623c010666c2a05d905985979b074ed5382..c1c4b750267a62e52c322867532461e85570d5ce 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