aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc-annotate.el
diff options
context:
space:
mode:
authorDan Nicolaescu2010-06-21 20:00:54 -0700
committerDan Nicolaescu2010-06-21 20:00:54 -0700
commit11c46b395d51525aea630ea24b030dce2f2ef2da (patch)
treeeaa8499e5fc40e9848a9e09c0701e44188a0cfca /lisp/vc-annotate.el
parentc4786d60fecb2fa6a8a7c7785032ebefddc974a8 (diff)
downloademacs-11c46b395d51525aea630ea24b030dce2f2ef2da.tar.gz
emacs-11c46b395d51525aea630ea24b030dce2f2ef2da.zip
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)
Diffstat (limited to 'lisp/vc-annotate.el')
-rw-r--r--lisp/vc-annotate.el9
1 files changed, 6 insertions, 3 deletions
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."
314 vc-annotate-display-mode)))) 314 vc-annotate-display-mode))))
315 315
316;;;###autoload 316;;;###autoload
317(defun vc-annotate (file rev &optional display-mode buf move-point-to) 317(defun vc-annotate (file rev &optional display-mode buf move-point-to vc-bk)
318 "Display the edit history of the current FILE using colors. 318 "Display the edit history of the current FILE using colors.
319 319
320This command creates a buffer that shows, for each line of the current 320This 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.
335 335
336If MOVE-POINT-TO is given, move the point to that line. 336If MOVE-POINT-TO is given, move the point to that line.
337 337
338If VC-BK is given used that VC backend.
339
338Customization variables: 340Customization variables:
339 341
340`vc-annotate-menu-elements' customizes the menu elements of the 342`vc-annotate-menu-elements' customizes the menu elements of the
@@ -375,7 +377,7 @@ mode-specific menu. `vc-annotate-color-map' and
375 ;; In case it had to be uniquified. 377 ;; In case it had to be uniquified.
376 (setq temp-buffer-name (buffer-name)))) 378 (setq temp-buffer-name (buffer-name))))
377 (with-output-to-temp-buffer temp-buffer-name 379 (with-output-to-temp-buffer temp-buffer-name
378 (let ((backend (vc-backend file)) 380 (let ((backend (or vc-bk (vc-backend file)))
379 (coding-system-for-read buffer-file-coding-system)) 381 (coding-system-for-read buffer-file-coding-system))
380 (vc-call-backend backend 'annotate-command file 382 (vc-call-backend backend 'annotate-command file
381 (get-buffer temp-buffer-name) rev) 383 (get-buffer temp-buffer-name) rev)
@@ -596,7 +598,8 @@ describes a revision number, so warp to that revision."
596 ;; place the point in the line. 598 ;; place the point in the line.
597 (min oldline (progn (goto-char (point-max)) 599 (min oldline (progn (goto-char (point-max))
598 (forward-line -1) 600 (forward-line -1)
599 (line-number-at-pos)))))))) 601 (line-number-at-pos)))
602 vc-annotate-backend)))))
600 603
601(defun vc-annotate-compcar (threshold a-list) 604(defun vc-annotate-compcar (threshold a-list)
602 "Test successive cons cells of A-LIST against THRESHOLD. 605 "Test successive cons cells of A-LIST against THRESHOLD.