all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Karl Chen <quarl@cs.berkeley.edu>
Subject: vc-svn.el vc-svn-diff patch: staying local when possible
Date: Thu, 30 Dec 2004 21:53:23 -0800	[thread overview]
Message-ID: <quack.20041230T2153.87d5wr2euk@quack.cs.berkeley.edu> (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)

             reply	other threads:[~2004-12-31  5:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-31  5:53 Karl Chen [this message]
2005-01-02 23:14 ` vc-svn.el vc-svn-diff patch: staying local when possible Stefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=quack.20041230T2153.87d5wr2euk@quack.cs.berkeley.edu \
    --to=quarl@cs.berkeley.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.