emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vc-svn.el vc-svn-diff patch: staying local when possible


From: Karl Chen
Subject: vc-svn.el vc-svn-diff patch: staying local when possible
Date: Thu, 30 Dec 2004 21:53:23 -0800

Hi,

Below is a patch to vc-svn-diff so that doing a vc-diff stays
local when possible.

Normally, `vc-diff' invokes the back-end diff function with
`oldvers' set to (vc-workfile-version file), instead of nil.

For whatever reason, "svn diff -r REV file", where REV is the
numeric workfile revision, is a remote operation, while "svn diff
file" (or "svn diff -r BASE file") is a local operation.  The
outputs are identical.

This patch makes vc-svn-diff call "svn diff file" instead of "svn
diff -r REV file" when REV is the workfile version.

-- 
Karl 2004-12-30 21:38


--- vc-svn.el   12 Dec 2004 22:30:40 -0800      1.16
+++ vc-svn.el   30 Dec 2004 21:48:14 -0800      
@@ -352,6 +352,8 @@
 (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)))
+      (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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]