From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: regression in C-x v = in latest versions Date: Sun, 26 Aug 2007 00:14:36 +0300 Message-ID: <200708260014.36817.pogonyshev@gmx.net> References: <200708191705.57599.pogonyshev@gmx.net> <200708232340.30025.pogonyshev@gmx.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1188075520 30379 80.91.229.12 (25 Aug 2007 20:58:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 25 Aug 2007 20:58:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eric S. Raymond , Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 25 22:58:37 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IP2iJ-0007Am-Mz for ged-emacs-devel@m.gmane.org; Sat, 25 Aug 2007 22:58:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IP2iJ-0007yA-B4 for ged-emacs-devel@m.gmane.org; Sat, 25 Aug 2007 16:58:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IP2i1-0007pG-4R for emacs-devel@gnu.org; Sat, 25 Aug 2007 16:58:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IP2hz-0007oB-6I for emacs-devel@gnu.org; Sat, 25 Aug 2007 16:58:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IP2hy-0007nz-VU for emacs-devel@gnu.org; Sat, 25 Aug 2007 16:58:15 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IP2hx-0003iY-J1 for emacs-devel@gnu.org; Sat, 25 Aug 2007 16:58:14 -0400 Original-Received: (qmail invoked by alias); 25 Aug 2007 20:58:06 -0000 Original-Received: from unknown (EHLO [80.94.234.197]) [80.94.234.197] by mail.gmx.net (mp034) with SMTP; 25 Aug 2007 22:58:06 +0200 X-Authenticated: #16844820 X-Provags-ID: V01U2FsdGVkX19sB6UM1Y9sDyhjEgtqX+aHN/QkVIi3P2p6M7pEru Pm9F3cT5BKUAmn User-Agent: KMail/1.7.2 In-Reply-To: Content-Disposition: inline X-Y-GMX-Trusted: 0 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:77155 Archived-At: 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)