unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* vc-svn.el vc-svn-diff patch: staying local when possible
@ 2004-12-31  5:53 Karl Chen
  2005-01-02 23:14 ` Stefan
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Chen @ 2004-12-31  5:53 UTC (permalink / raw)


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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vc-svn.el vc-svn-diff patch: staying local when possible
  2004-12-31  5:53 vc-svn.el vc-svn-diff patch: staying local when possible Karl Chen
@ 2005-01-02 23:14 ` Stefan
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan @ 2005-01-02 23:14 UTC (permalink / raw)
  Cc: Emacs Developement List

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

Thank you.  Installed,


        Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-02 23:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-31  5:53 vc-svn.el vc-svn-diff patch: staying local when possible Karl Chen
2005-01-02 23:14 ` Stefan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).