aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2001-11-25 23:52:51 +0000
committerStefan Monnier2001-11-25 23:52:51 +0000
commit4a9b4f3079ede351a6342ca1b73f222a39b43879 (patch)
treec9a2215972a1275afe72e9f6f4557860c6cd5a6d
parent438e57dde37b5e0ec02a9140394db90c92cb0276 (diff)
downloademacs-4a9b4f3079ede351a6342ca1b73f222a39b43879.tar.gz
emacs-4a9b4f3079ede351a6342ca1b73f222a39b43879.zip
(vc-cvs-parse-entry): Rewrite, comparing the string-
rather than integer- representation of dates.
-rw-r--r--lisp/vc-cvs.el42
1 files changed, 7 insertions, 35 deletions
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index e8140d9fc11..5bd79df3db2 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.25 2001/10/21 12:21:29 spiegel Exp $ 8;; $Id: vc-cvs.el,v 1.26 2001/10/22 07:57:00 spiegel Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -736,46 +736,18 @@ is non-nil."
736 ;; revision 736 ;; revision
737 "/\\([^/]*\\)" 737 "/\\([^/]*\\)"
738 ;; timestamp 738 ;; timestamp
739 "/[A-Z][a-z][a-z]" ;; week day (irrelevant) 739 "/\\([^/]*\\)"))
740 " \\([A-Z][a-z][a-z]\\)" ;; month name
741 " *\\([0-9]*\\)" ;; day of month
742 " \\([0-9]*\\):\\([0-9]*\\):\\([0-9]*\\)" ;; hms
743 " \\([0-9]*\\)" ;; year
744 ;; optional conflict field
745 "\\(+[^/]*\\)?/"))
746 (vc-file-setprop file 'vc-workfile-version (match-string 1)) 740 (vc-file-setprop file 'vc-workfile-version (match-string 1))
747 ;; compare checkout time and modification time 741 ;; compare checkout time and modification time
748 (let ((second (string-to-number (match-string 6))) 742 (let ((mtime (nth 5 (file-attributes file)))
749 (minute (string-to-number (match-string 5))) 743 (system-time-locale "C"))
750 (hour (string-to-number (match-string 4))) 744 (cond ((equal (format-time-string "%c" mtime 'utc) (match-string 2))
751 (day (string-to-number (match-string 3)))
752 (year (string-to-number (match-string 7)))
753 (month (/ (string-match
754 (match-string 2)
755 "xxxJanFebMarAprMayJunJulAugSepOctNovDec")
756 3))
757 (mtime (nth 5 (file-attributes file))))
758 (cond ((equal mtime
759 (encode-time second minute hour day month year 0))
760 (vc-file-setprop file 'vc-checkout-time mtime) 745 (vc-file-setprop file 'vc-checkout-time mtime)
761 (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) 746 (if set-state (vc-file-setprop file 'vc-state 'up-to-date)))
762 (t 747 (t
763 (vc-file-setprop file 'vc-checkout-time 0) 748 (vc-file-setprop file 'vc-checkout-time 0)
764 (if set-state (vc-file-setprop file 'vc-state 'edited)))))) 749 (if set-state (vc-file-setprop file 'vc-state 'edited))))))))
765 ;; entry with arbitrary text as timestamp 750
766 ;; (this means we should consider it modified)
767 ((looking-at
768 (concat "/[^/]+"
769 ;; revision
770 "/\\([^/]*\\)"
771 ;; timestamp (arbitrary text)
772 "/[^/]*"
773 ;; optional conflict field
774 "\\(+[^/]*\\)?/"))
775 (vc-file-setprop file 'vc-workfile-version (match-string 1))
776 (vc-file-setprop file 'vc-checkout-time 0)
777 (if set-state (vc-file-setprop file 'vc-state 'edited)))))
778
779(provide 'vc-cvs) 751(provide 'vc-cvs)
780 752
781;;; vc-cvs.el ends here 753;;; vc-cvs.el ends here