diff lisp/vc/vc.el @ 109302:60516122d066

Merge changes from emacs-23 branch.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 10 Jul 2010 14:52:53 -0400
parents c70ff40ac4ce
children d43e7dfda4f1 a9586dc942d5 051595eb9b58
line wrap: on
line diff
--- a/lisp/vc/vc.el	Sat Jul 10 17:29:46 2010 +0300
+++ b/lisp/vc/vc.el	Sat Jul 10 14:52:53 2010 -0400
@@ -1700,8 +1700,9 @@
 		    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)))
@@ -1719,7 +1720,9 @@
 		      ;; 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))))