summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-08-23 21:05:25 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-08-23 21:05:25 -0700
commitca5256ad0a138d14329ca80a0a4fd952ca2cd092 (patch)
tree6de47e5336144b7405ae44f06ea6e4b9d24644b6
parent2cc2116757629868401bdb2073ff44ce32c3d008 (diff)
downloademacs-ca5256ad0a138d14329ca80a0a4fd952ca2cd092.tar.gz
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.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/vc/vc-cvs.el6
2 files changed, 12 insertions, 1 deletions
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 <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
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