changeset 109254:827f21099a9d

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)
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 21 Jun 2010 20:00:54 -0700
parents a41a9e7bfad8
children 424a3703328f
files lisp/ChangeLog lisp/vc-annotate.el
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Jun 21 19:08:55 2010 -0700
+++ b/lisp/ChangeLog	Mon Jun 21 20:00:54 2010 -0700
@@ -1,5 +1,10 @@
 2010-06-22  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	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  <dann@ics.uci.edu>
 
-	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
--- a/lisp/vc-annotate.el	Mon Jun 21 19:08:55 2010 -0700
+++ b/lisp/vc-annotate.el	Mon Jun 21 20:00:54 2010 -0700
@@ -314,7 +314,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
@@ -335,6 +335,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
@@ -375,7 +377,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)
@@ -596,7 +598,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.