diff options
| -rw-r--r-- | lisp/vc-cvs.el | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 458bec111b1..a1a12690c5f 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: FSF (see vc.el for full credits) | 5 | ;; Author: FSF (see vc.el for full credits) |
| 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
| 7 | 7 | ||
| 8 | ;; $Id: vc-cvs.el,v 1.62 2003/07/04 22:40:26 monnier Exp $ | 8 | ;; $Id: vc-cvs.el,v 1.63 2003/09/01 15:45:17 miles Exp $ |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -922,20 +922,22 @@ is non-nil." | |||
| 922 | (vc-file-setprop file 'vc-workfile-version (match-string 1)) | 922 | (vc-file-setprop file 'vc-workfile-version (match-string 1)) |
| 923 | (vc-file-setprop file 'vc-cvs-sticky-tag | 923 | (vc-file-setprop file 'vc-cvs-sticky-tag |
| 924 | (vc-cvs-parse-sticky-tag (match-string 4) (match-string 5))) | 924 | (vc-cvs-parse-sticky-tag (match-string 4) (match-string 5))) |
| 925 | ;; compare checkout time and modification time | 925 | ;; Compare checkout time and modification time. |
| 926 | (let* ((mtime (nth 5 (file-attributes file))) | 926 | ;; This is intentionally different from the algorithm that CVS uses |
| 927 | (system-time-locale "C") | 927 | ;; (based on textual comparison), because there can be problems |
| 928 | (mtstr (format-time-string "%c" mtime 'utc))) | 928 | ;; generating a time string that looks exactly like the one from CVS. |
| 929 | ;; Solaris sometimes uses "Wed Sep 05" instead of "Wed Sep 5". | 929 | (let ((mtime (nth 5 (file-attributes file)))) |
| 930 | ;; See "grep '[^a-z_]ctime' cvs/src/*.c" for reference. | 930 | (require 'parse-time) |
| 931 | (if (= (aref mtstr 8) ?0) | 931 | (let ((parsed-time |
| 932 | (setq mtstr (concat (substring mtstr 0 8) " " (substring mtstr 9)))) | 932 | (parse-time-string (concat (match-string 2) " +0000")))) |
| 933 | (cond ((equal mtstr (match-string 2)) | 933 | (cond ((and (not (string-match "\\+" (match-string 2))) |
| 934 | (vc-file-setprop file 'vc-checkout-time mtime) | 934 | (car parsed-time) |
| 935 | (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) | 935 | (equal mtime (apply 'encode-time parsed-time))) |
| 936 | (t | 936 | (vc-file-setprop file 'vc-checkout-time mtime) |
| 937 | (vc-file-setprop file 'vc-checkout-time 0) | 937 | (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) |
| 938 | (if set-state (vc-file-setprop file 'vc-state 'edited)))))))) | 938 | (t |
| 939 | (vc-file-setprop file 'vc-checkout-time 0) | ||
| 940 | (if set-state (vc-file-setprop file 'vc-state 'edited))))))))) | ||
| 939 | 941 | ||
| 940 | (provide 'vc-cvs) | 942 | (provide 'vc-cvs) |
| 941 | 943 | ||