emacs-devel
[Top][All Lists]
Advanced

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

Re: regression in C-x v = in latest versions


From: Paul Pogonyshev
Subject: Re: regression in C-x v = in latest versions
Date: Sun, 26 Aug 2007 00:14:36 +0300
User-agent: KMail/1.7.2

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 via email to

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