changeset 101796:0dd7b7766a85

(vc-svn-diff): Revert previous change but add a test for newvars is nil. (C-u C-x v = with default values).
author Nick Roberts <nickrob@snap.net.nz>
date Wed, 04 Feb 2009 10:49:04 +0000
parents 22144f4fd301
children 2dad5b4d31d5
files lisp/vc-svn.el
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc-svn.el	Wed Feb 04 10:46:14 2009 +0000
+++ b/lisp/vc-svn.el	Wed Feb 04 10:49:04 2009 +0000
@@ -483,6 +483,19 @@
 
 (defun vc-svn-diff (files &optional oldvers newvers buffer)
   "Get a difference report using SVN between two revisions of fileset FILES."
+  (and oldvers
+       (not newvers)
+       files
+       (catch 'no
+	 (dolist (f files)
+	   (or (equal oldvers (vc-working-revision f))
+	       (throw 'no nil)))
+	 t)
+       ;; Use nil rather than the current revision because svn handles
+       ;; it better (i.e. locally).  Note that if _any_ of the files
+       ;; has a different revision, we fetch the lot, which is
+       ;; obviously sub-optimal.
+       (setq oldvers nil))
   (let* ((switches
 	    (if vc-svn-diff-switches
 		(vc-switches 'SVN 'diff)