all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmx.net>
To: Eric S. Raymond <esr@snark.thyrsus.com>, Glenn Morris <rgm@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: regression in C-x v = in latest versions
Date: Sun, 26 Aug 2007 00:14:36 +0300	[thread overview]
Message-ID: <200708260014.36817.pogonyshev@gmx.net> (raw)
In-Reply-To: <a17injjq3l.fsf@fencepost.gnu.org>

Hi, Eric.

In response to my complaint:

  With latest Emacs versions (yesterday SVN) I get very annoying behaviour
  of C-x v = on SVN repository.  Now it doesn't use offline SVN copy of
  modified files anymore, instead it always asks the server to diff.

  E.g.  I open up an SVN-managed file, and type C-o C-x v =.  Previously,
  I'd get instant difference of one added empty line, against offline
  clean copy.  Now instead I get

        Running svn diff -r NNN FILENAME in the background...

  in the echo area.  I guess the problem is in specifying the exact
  revision number.

Glenn Morris pointed to your change and proposed a patch.  Can you please
comment on your initial intensions and whether Glenn's patch is OK?

Paul

Glenn Morris wrote (thanks for reply, BTW):
> This problem (only in the CVS trunk, therefore not relevant for Emacs
> 22.2, by the way) was introduced by Eric Raymond's 2007-07-18 change
> to VC. The (rather ominous) cvs log entry reads only:
> 
>     Put the lower half (the back-end) of NewVC in place. This commit
>     makes only the minimum changes needed to get the old vc.el logic
>     working with the new back ends.
> 
> You may get better response by complaining to him directly, since he
> seem to be independent of these lists.
> 
> Anyway, it's caused by the removal of this code from vc-svn-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))
> 
> "file" has now been replaced by "files", a list. vc-workfile-version
> can easily be generalized to accept a list of files as input, so
> here's a possible patch. Though I don't understand how this is
> supposed to work now.
> 
> 
> *** vc-hooks.el	22 Aug 2007 20:18:34 -0700	1.206
> --- vc-hooks.el	25 Aug 2007 13:34:14 -0700	
> ***************
> *** 549,559 ****
>   
>   (defun vc-workfile-version (file)
>     "Return the repository version from which FILE was checked out.
> ! If FILE is not registered, this function always returns nil."
>     (or (vc-file-getprop file 'vc-workfile-version)
>         (if (vc-backend file)
>             (vc-file-setprop file 'vc-workfile-version
> !                            (vc-call workfile-version file)))))
>   
>   (defun vc-default-registered (backend file)
>     "Check if FILE is registered in BACKEND using vc-BACKEND-master-templates."
> --- 549,562 ----
>   
>   (defun vc-workfile-version (file)
>     "Return the repository version from which FILE was checked out.
> ! If FILE is not registered, this function always returns nil.  If
> ! FILE is a list of files, return a list of repository versions."
> !   (if (listp file)
> !       (mapcar 'vc-workfile-version file)
>       (or (vc-file-getprop file 'vc-workfile-version)
>           (if (vc-backend file)
>               (vc-file-setprop file 'vc-workfile-version
> !                              (vc-call workfile-version file))))))
>   
>   (defun vc-default-registered (backend file)
>     "Check if FILE is registered in BACKEND using vc-BACKEND-master-templates."
> 
> *** vc-svn.el	25 Jul 2007 22:29:39 -0700	1.39
> --- vc-svn.el	25 Aug 2007 13:33:46 -0700	
> ***************
> *** 399,404 ****
> --- 399,413 ----
>   
>   (defun vc-svn-diff (files &optional oldvers newvers buffer)
>     "Get a difference report using SVN between two versions of fileset FILES."
> +    (if (and oldvers
> + 	    (catch 'no
> + 	      (dolist (v (vc-workfile-version files))
> + 		(or (equal oldvers v)
> + 		    (throw 'no nil)))
> + 	      t))
> +        ;; Use nil rather than the current revision because svn handles it
> +        ;; better (i.e. locally).
> +        (setq oldvers nil))
>     (let* ((switches
>   	    (if vc-svn-diff-switches
>   		(vc-switches 'SVN 'diff)

  reply	other threads:[~2007-08-25 21:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-19 14:05 regression in C-x v = in latest versions Paul Pogonyshev
2007-08-23 20:40 ` Paul Pogonyshev
2007-08-24 16:10   ` Richard Stallman
2007-08-25  0:05     ` Nick Roberts
2007-08-25 20:52       ` Richard Stallman
2007-08-25 21:07         ` Chong Yidong
2007-08-26 14:56           ` Richard Stallman
2007-08-25 22:37         ` Nick Roberts
2007-08-25 20:50   ` Glenn Morris
2007-08-25 21:14     ` Paul Pogonyshev [this message]
2007-08-26  1:08     ` Richard Stallman
2007-08-26  2:12       ` Glenn Morris
2007-08-26 22:47         ` Richard Stallman
2007-08-27  7:05           ` Glenn Morris
2007-08-26  2:31       ` Stefan Monnier
2007-08-26 22:47         ` Richard Stallman
2007-08-27  2:15           ` Chong Yidong
2007-08-27 18:18             ` Richard Stallman
2007-09-02 17:46               ` Dan Nicolaescu
2007-08-26  2:27     ` Stefan Monnier

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=200708260014.36817.pogonyshev@gmx.net \
    --to=pogonyshev@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=esr@snark.thyrsus.com \
    --cc=rgm@gnu.org \
    /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.