Subject: Re: bug#12001: 24.1.50; vc-diff always talks to CVS repository

From: Paul Eggert <[email-masked]>
Date: Thu, 23 Aug 2012 01:18:43 -0700

Does the following patch fix the problem for you?
It is designed to fix the symptoms that Glenn reported.

=== modified file 'lisp/vc/vc-cvs.el'
--- lisp/vc/vc-cvs.el	2012-07-11 23:13:41 +0000
+++ lisp/vc/vc-cvs.el	2012-08-23 08:14:11 +0000
@@ -1178,7 +1178,11 @@
                                (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