Mercurial > emacs
diff lisp/vc/vc-annotate.el @ 109431:799b50142743
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sun, 11 Jul 2010 22:57:47 +0000 |
parents | ff42e5c5f789 60516122d066 |
children | 1b626601d32d |
line wrap: on
line diff
--- a/lisp/vc/vc-annotate.el Fri Jul 09 01:50:09 2010 +0000 +++ b/lisp/vc/vc-annotate.el Sun Jul 11 22:57:47 2010 +0000 @@ -315,7 +315,7 @@ vc-annotate-display-mode)))) ;;;###autoload -(defun vc-annotate (file rev &optional display-mode buf move-point-to) +(defun vc-annotate (file rev &optional display-mode buf move-point-to vc-bk) "Display the edit history of the current FILE using colors. This command creates a buffer that shows, for each line of the current @@ -336,6 +336,8 @@ If MOVE-POINT-TO is given, move the point to that line. +If VC-BK is given used that VC backend. + Customization variables: `vc-annotate-menu-elements' customizes the menu elements of the @@ -376,7 +378,7 @@ ;; In case it had to be uniquified. (setq temp-buffer-name (buffer-name)))) (with-output-to-temp-buffer temp-buffer-name - (let ((backend (vc-backend file)) + (let ((backend (or vc-bk (vc-backend file))) (coding-system-for-read buffer-file-coding-system)) (vc-call-backend backend 'annotate-command file (get-buffer temp-buffer-name) rev) @@ -462,7 +464,7 @@ (if (not rev-at-line) (message "Cannot extract revision number from the current line") (switch-to-buffer-other-window - (vc-find-revision (cdr rev-at-line) (car rev-at-line))))))) + (vc-find-revision (cdr rev-at-line) (car rev-at-line) vc-annotate-backend)))))) (defun vc-annotate-revision-previous-to-line () "Visit the annotation of the revision before the revision at line." @@ -527,7 +529,7 @@ (message "Cannot extract revision number from the current line") (setq prev-rev (vc-call-backend vc-annotate-backend 'previous-revision - fname rev)) + (if filediff fname nil) rev)) (if (not prev-rev) (message "Cannot diff from any revision prior to %s" rev) (save-window-excursion @@ -597,7 +599,8 @@ ;; place the point in the line. (min oldline (progn (goto-char (point-max)) (forward-line -1) - (line-number-at-pos)))))))) + (line-number-at-pos))) + vc-annotate-backend))))) (defun vc-annotate-compcar (threshold a-list) "Test successive cons cells of A-LIST against THRESHOLD.