]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-svn-diff): Revert previous change but add a test
authorNick Roberts <nickrob@snap.net.nz>
Wed, 4 Feb 2009 10:49:04 +0000 (10:49 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Wed, 4 Feb 2009 10:49:04 +0000 (10:49 +0000)
for newvars is nil. (C-u C-x v = with default values).

lisp/vc-svn.el

index c2d0d62ab6ced7c8e33a37b78c53e28cf8af378a..e79ef9a0fa6ee671a0b7e8cbe35e9060a901b9b2 100644 (file)
@@ -483,6 +483,19 @@ or svn+ssh://."
 
 (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)