summaryrefslogtreecommitdiff
path: root/lisp/vc-svn.el
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2009-02-04 10:49:04 +0000
committerNick Roberts <nickrob@snap.net.nz>2009-02-04 10:49:04 +0000
commit22b5692c3d5921910c1d9b3bf4b5fffb155694e7 (patch)
tree501fb688d85c4686d5e3e79eb84ad08e15286064 /lisp/vc-svn.el
parent77900a45d479ca114e6354331cc107ba459d50ff (diff)
downloademacs-22b5692c3d5921910c1d9b3bf4b5fffb155694e7.tar.gz
(vc-svn-diff): Revert previous change but add a test
for newvars is nil. (C-u C-x v = with default values).
Diffstat (limited to 'lisp/vc-svn.el')
-rw-r--r--lisp/vc-svn.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el
index c2d0d62ab6c..e79ef9a0fa6 100644
--- a/lisp/vc-svn.el
+++ b/lisp/vc-svn.el
@@ -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)