From: Paul Eggert Date: Fri, 24 Aug 2012 04:05:25 +0000 (-0700) Subject: Fix file time stamp problem with bzr and CVS (Bug#12001). X-Git-Tag: emacs-24.2.90~528 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ca5256ad0a138d14329ca80a0a4fd952ca2cd092;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c92691b64b8..5236ad55903 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-08-24 Paul Eggert + + 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 * info.el (Info-fontify-node): Hide the suffix of the diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 2a672623c01..c1c4b750267 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -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