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:
parent
bf07af865c
commit
3b5d63dd57
1 changed files with 16 additions and 5 deletions
21
vc-p4.el
21
vc-p4.el
|
@ -602,7 +602,6 @@ Annotate version VERSION if it's specified."
|
|||
(concat file
|
||||
(p4-lowlevel-canonicalize-revision version))
|
||||
file))
|
||||
(now (car (current-time)))
|
||||
log-buffer times)
|
||||
(call-process vc-p4-annotate-command
|
||||
nil
|
||||
|
@ -620,9 +619,8 @@ Annotate version VERSION if it's specified."
|
|||
(year (string-to-number (match-string 2)))
|
||||
(month (string-to-number (match-string 3)))
|
||||
(day (string-to-number (match-string 4)))
|
||||
(then (car (encode-time 0 0 0 day month year)))
|
||||
(difference (- now then)))
|
||||
(setq times (cons (cons change-no difference)
|
||||
(then (encode-time 0 0 0 day month year)))
|
||||
(setq times (cons (cons change-no then)
|
||||
times))))
|
||||
(set-buffer buffer)
|
||||
(setq vc-p4-change-times times)))
|
||||
|
@ -637,7 +635,20 @@ line at point and the current time."
|
|||
(and (re-search-forward regex nil t)
|
||||
(forward-line 0)))
|
||||
(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)))
|
||||
|
||||
(defun vc-p4-previous-version (file rev)
|
||||
|
|
Loading…
Reference in a new issue