comparison lisp/vc-svn.el @ 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 6bc8fe0c390a
children 4eaca528c43f
comparison
equal deleted inserted replaced
101795:22144f4fd301 101796:0dd7b7766a85
481 ;; Dump log for the entire directory. 481 ;; Dump log for the entire directory.
482 (vc-svn-command buffer 0 nil "log" "-rHEAD:0"))))) 482 (vc-svn-command buffer 0 nil "log" "-rHEAD:0")))))
483 483
484 (defun vc-svn-diff (files &optional oldvers newvers buffer) 484 (defun vc-svn-diff (files &optional oldvers newvers buffer)
485 "Get a difference report using SVN between two revisions of fileset FILES." 485 "Get a difference report using SVN between two revisions of fileset FILES."
486 (and oldvers
487 (not newvers)
488 files
489 (catch 'no
490 (dolist (f files)
491 (or (equal oldvers (vc-working-revision f))
492 (throw 'no nil)))
493 t)
494 ;; Use nil rather than the current revision because svn handles
495 ;; it better (i.e. locally). Note that if _any_ of the files
496 ;; has a different revision, we fetch the lot, which is
497 ;; obviously sub-optimal.
498 (setq oldvers nil))
486 (let* ((switches 499 (let* ((switches
487 (if vc-svn-diff-switches 500 (if vc-svn-diff-switches
488 (vc-switches 'SVN 'diff) 501 (vc-switches 'SVN 'diff)
489 (list "--diff-cmd=diff" "-x" 502 (list "--diff-cmd=diff" "-x"
490 (mapconcat 'identity (vc-switches nil 'diff) " ")))) 503 (mapconcat 'identity (vc-switches nil 'diff) " "))))