aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2012-08-23 21:05:25 -0700
committerPaul Eggert <[email protected]>2012-08-23 21:05:25 -0700
commitca5256ad0a138d14329ca80a0a4fd952ca2cd092 (patch)
tree6de47e5336144b7405ae44f06ea6e4b9d24644b6 /lisp/vc
parent2cc2116757629868401bdb2073ff44ce32c3d008 (diff)
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.
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/vc-cvs.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 2a672623c0..c1c4b75026 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