]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-svn.el
(tree-widget-value-create): Simplify last change.
[gnu-emacs] / lisp / vc-svn.el
index cbb951d60b7b35b14aa7aad7faecb23ad84256f5..b6e3ac2956897a7a594051c3b048a2f4ddf982ae 100644 (file)
@@ -1,6 +1,6 @@
 ;;; vc-svn.el --- non-resident support for Subversion version-control
 
-;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 ;;           Free Software Foundation, Inc.
 
 ;; Author:      FSF (see vc.el for full credits)
@@ -51,7 +51,7 @@
                 (repeat :tag "Argument List"
                         :value ("")
                         string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-svn-register-switches nil
@@ -63,7 +63,7 @@ A string or list of strings passed to the checkin program by
                 (repeat :tag "Argument List"
                         :value ("")
                         string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-svn-diff-switches
@@ -77,12 +77,12 @@ If you want to force an empty list of arguments, use t."
                 (repeat :tag "Argument List"
                         :value ("")
                         string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-svn-header (or (cdr (assoc 'SVN vc-header-alist)) '("\$Id\$"))
   "*Header keywords to be inserted by `vc-insert-headers'."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat string)
   :group 'vc)
 
@@ -92,7 +92,7 @@ If you want to force an empty list of arguments, use t."
 This is only meaningful if you don't use the implicit checkout model
 \(i.e. if you have $SVNREAD set)."
   ;; :type 'boolean
-  ;; :version "21.4"
+  ;; :version "22.1"
   ;; :group 'vc
   )
 
@@ -352,6 +352,10 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
 (defun vc-svn-diff (file &optional oldvers newvers buffer)
   "Get a difference report using SVN between two versions of FILE."
   (unless buffer (setq buffer "*vc-diff*"))
+  (if (and oldvers (equal oldvers (vc-workfile-version file)))
+      ;; Use nil rather than the current revision because svn handles it
+      ;; better (i.e. locally).
+      (setq oldvers nil))
   (if (string= (vc-workfile-version file) "0")
       ;; This file is added but not yet committed; there is no master file.
       (if (or oldvers newvers)
@@ -368,7 +372,8 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
            (if vc-svn-diff-switches
                (vc-switches 'SVN 'diff)
              (list "-x" (mapconcat 'identity (vc-switches nil 'diff) " "))))
-          (async (and (vc-stay-local-p file)
+          (async (and (not vc-disable-async-diff)
+                       (vc-stay-local-p file)
                       (or oldvers newvers) ; Svn diffs those locally.
                       (fboundp 'start-process))))
       (apply 'vc-svn-command buffer