Compatibility with the current version of vc.el in CVS at

:pserver:anoncvs@subversions.gnu.org:/cvsroot/emacs.

[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 1223]
This commit is contained in:
Jonathan Kamens 2002-01-06 11:23:04 -08:00
parent bf07af865c
commit 3b5d63dd57

View file

@ -602,7 +602,6 @@ Annotate version VERSION if it's specified."
(concat file (concat file
(p4-lowlevel-canonicalize-revision version)) (p4-lowlevel-canonicalize-revision version))
file)) file))
(now (car (current-time)))
log-buffer times) log-buffer times)
(call-process vc-p4-annotate-command (call-process vc-p4-annotate-command
nil nil
@ -620,9 +619,8 @@ Annotate version VERSION if it's specified."
(year (string-to-number (match-string 2))) (year (string-to-number (match-string 2)))
(month (string-to-number (match-string 3))) (month (string-to-number (match-string 3)))
(day (string-to-number (match-string 4))) (day (string-to-number (match-string 4)))
(then (car (encode-time 0 0 0 day month year))) (then (encode-time 0 0 0 day month year)))
(difference (- now then))) (setq times (cons (cons change-no then)
(setq times (cons (cons change-no difference)
times)))) times))))
(set-buffer buffer) (set-buffer buffer)
(setq vc-p4-change-times times))) (setq vc-p4-change-times times)))
@ -637,7 +635,20 @@ line at point and the current time."
(and (re-search-forward regex nil t) (and (re-search-forward regex nil t)
(forward-line 0))) (forward-line 0)))
(setq match (assoc (match-string 1) vc-p4-change-times))) (setq match (assoc (match-string 1) vc-p4-change-times)))
(cdr match) (- (car (current-time)) (cadr match))
nil)))
(defun vc-p4-annotate-time ()
"Returns the time of the next Perforce annotation at or after point,
as a floating point fractional number of days."
(let ((regex (concat "^[[:space:]]*[[:digit:]]+[[:space:]]+"
"[^[:space:]]+[[:space:]]+\\([[:digit:]]+\\)"))
match)
(if (and (or (looking-at regex)
(and (re-search-forward regex nil t)
(forward-line 0)))
(setq match (assoc (match-string 1) vc-p4-change-times)))
(vc-annotate-convert-time (cdr match))
nil))) nil)))
(defun vc-p4-previous-version (file rev) (defun vc-p4-previous-version (file rev)