]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-svn.el
*** empty log message ***
[gnu-emacs] / lisp / vc-svn.el
index 1539c5c2d5d8062e7522a79614ef292127d390a7..0b34c30f630ce169384ab9e82ed30f5f303f1993 100644 (file)
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -399,6 +399,17 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
 
 (defun vc-svn-diff (files &optional oldvers newvers buffer)
   "Get a difference report using SVN between two versions of fileset FILES."
+  (and oldvers
+       (catch 'no
+        (dolist (f files)
+          (or (equal oldvers (vc-workfile-version 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)