aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2010-06-21 20:00:54 -0700
committerDan Nicolaescu2010-06-21 20:00:54 -0700
commit11c46b395d51525aea630ea24b030dce2f2ef2da (patch)
treeeaa8499e5fc40e9848a9e09c0701e44188a0cfca
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)
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/vc-annotate.el9
2 files changed, 12 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7aaeb51739d..9fc3e154269 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12010-06-22 Dan Nicolaescu <dann@ics.uci.edu> 12010-06-22 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 Fix annotating other revisions for renamed files in vc-annotate.
4 * vc-annotate.el (vc-annotate): Add an optional argument for the
5 VC backend. Use it when non-nil.
6 (vc-annotate-warp-revision): Pass the VC backend to vc-annotate. (Bug#6487)
7
3 Fix vc-annotate-show-changeset-diff-revision-at-line for git. 8 Fix vc-annotate-show-changeset-diff-revision-at-line for git.
4 * vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): 9 * vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal):
5 Do not pass the file name to the 'previous-revision call when we 10 Do not pass the file name to the 'previous-revision call when we
@@ -7,7 +12,7 @@
7 12
82010-06-21 Dan Nicolaescu <dann@ics.uci.edu> 132010-06-21 Dan Nicolaescu <dann@ics.uci.edu>
9 14
10 Fix finding revisions in for renamed files in vc-annotate. 15 Fix finding revisions for renamed files in vc-annotate.
11 * vc.el (vc-find-revision): Add an optional argument for 16 * vc.el (vc-find-revision): Add an optional argument for
12 the VC backend. Use it when non-nil. 17 the VC backend. Use it when non-nil.
13 * vc-annotate.el (vc-annotate-find-revision-at-line): Pass the VC 18 * 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."
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.