From: Dan Nicolaescu Date: Tue, 22 Jun 2010 03:00:54 +0000 (-0700) Subject: Fix annotating other revisions for renamed files in vc-annotate. X-Git-Tag: emacs-pretest-23.2.90~139^2~108 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11c46b395d51525aea630ea24b030dce2f2ef2da;p=emacs.git Fix annotating other revisions for renamed files in vc-annotate. * lisp/vc-annotate.el (vc-annotate): Add an optional argument for the VC backend. Use it when non-nil. (vc-annotate-warp-revision): Pass the VC backend to vc-annotate. (Bug#6487) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7aaeb51739d..9fc3e154269 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2010-06-22 Dan Nicolaescu + Fix annotating other revisions for renamed files in vc-annotate. + * vc-annotate.el (vc-annotate): Add an optional argument for the + VC backend. Use it when non-nil. + (vc-annotate-warp-revision): Pass the VC backend to vc-annotate. (Bug#6487) + Fix vc-annotate-show-changeset-diff-revision-at-line for git. * vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): Do not pass the file name to the 'previous-revision call when we @@ -7,7 +12,7 @@ 2010-06-21 Dan Nicolaescu - Fix finding revisions in for renamed files in vc-annotate. + Fix finding revisions for renamed files in vc-annotate. * vc.el (vc-find-revision): Add an optional argument for the VC backend. Use it when non-nil. * vc-annotate.el (vc-annotate-find-revision-at-line): Pass the VC diff --git a/lisp/vc-annotate.el b/lisp/vc-annotate.el index ffc11953903..da2f5de80df 100644 --- a/lisp/vc-annotate.el +++ b/lisp/vc-annotate.el @@ -314,7 +314,7 @@ use; you may override this using the second optional arg MODE." 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 @@ -335,6 +335,8 @@ age, and everything that is older than that is shown in blue. 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 @@ -375,7 +377,7 @@ mode-specific menu. `vc-annotate-color-map' and ;; 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) @@ -596,7 +598,8 @@ describes a revision number, so warp to that revision." ;; 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.