diff options
author | Dan Nicolaescu <[email protected]> | 2010-06-21 18:26:30 -0700 |
---|---|---|
committer | Dan Nicolaescu <[email protected]> | 2010-06-21 18:26:30 -0700 |
commit | 04ec0963f662150746408ff3f9c085240f83bb54 (patch) | |
tree | b7a6e7b6b4ecd32e46dfed78e60cf6104e8da1db /lisp/vc.el | |
parent | c036381c22255c48bf71cc2f58bb1f061a801523 (diff) |
Fix finding revisions in for renamed files in vc-annotate.
* lisp/vc.el (vc-find-revision): Add an optional argument for
the VC backend. Use it when non-nil.
* lisp/vc-annotate.el (vc-annotate-find-revision-at-line): Pass the VC
backend to vc-find-revision. (Bug#6487)
Diffstat (limited to 'lisp/vc.el')
-rw-r--r-- | lisp/vc.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index e29603fcc1..194c2a0898 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1655,8 +1655,9 @@ If `F.~REV~' already exists, use it instead of checking it out again." rev))) (switch-to-buffer-other-window (vc-find-revision file revision)))) -(defun vc-find-revision (file revision) - "Read REVISION of FILE into a buffer and return the buffer." +(defun vc-find-revision (file revision &optional backend) + "Read REVISION of FILE into a buffer and return the buffer. +Use BACKEND as the VC backend if specified." (let ((automatic-backup (vc-version-backup-file-name file revision)) (filebuf (or (get-file-buffer file) (current-buffer))) (filename (vc-version-backup-file-name file revision 'manual))) @@ -1674,7 +1675,9 @@ If `F.~REV~' already exists, use it instead of checking it out again." ;; Change buffer to get local value of ;; vc-checkout-switches. (with-current-buffer filebuf - (vc-call find-revision file revision outbuf)))) + (if backend + (vc-call-backend backend 'find-revision file revision outbuf) + (vc-call find-revision file revision outbuf))))) (setq failed nil)) (when (and failed (file-exists-p filename)) (delete-file filename)))) |