From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexandru Harsanyi Newsgroups: gmane.emacs.devel Subject: Re: State of VC? Date: Sat, 26 Jan 2008 16:46:17 +0900 Message-ID: <702CB3E3-18B0-4696-BE8B-B814A451B2B0@mac.com> References: <20080122164306.3B33C83045C@snark.thyrsus.com> <200801222207.m0MM7rlR014153@sallyv1.ics.uci.edu> <200801240707.m0O77KcX018757@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1201333609 2872 80.91.229.12 (26 Jan 2008 07:46:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Jan 2008 07:46:49 +0000 (UTC) Cc: Emacs Devel To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 26 08:47:08 2008 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 1JIfkl-0003ba-VA for ged-emacs-devel@m.gmane.org; Sat, 26 Jan 2008 08:47:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIfkL-0003jY-58 for ged-emacs-devel@m.gmane.org; Sat, 26 Jan 2008 02:46:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIfkA-0003jC-Tw for emacs-devel@gnu.org; Sat, 26 Jan 2008 02:46:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIfk8-0003il-Q3 for emacs-devel@gnu.org; Sat, 26 Jan 2008 02:46:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIfk8-0003ii-JC for emacs-devel@gnu.org; Sat, 26 Jan 2008 02:46:24 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JIfk8-0000cW-95 for emacs-devel@gnu.org; Sat, 26 Jan 2008 02:46:24 -0500 Original-Received: from hosted06.westnet.com.au ([203.10.1.221]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JIfk5-0001MU-O1 for emacs-devel@gnu.org; Sat, 26 Jan 2008 02:46:22 -0500 Original-Received: from hosted06.westnet.com.au (hosted06.westnet.com.au [127.0.0.1]) by hosted06.westnet.com.au (Postfix) with SMTP id 1E6F22DEC39; Sat, 26 Jan 2008 16:46:17 +0900 (WST) Original-Received: from [10.0.1.2] (dsl-220-235-128-249.wa.westnet.com.au [220.235.128.249]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by hosted06.westnet.com.au (Postfix) with ESMTP id 52B0E2DE873; Sat, 26 Jan 2008 16:46:15 +0900 (WST) In-Reply-To: <200801240707.m0O77KcX018757@sallyv1.ics.uci.edu> X-Mailer: Apple Mail (2.753) X-PMX-Branch: TNG-Outgoing X-detected-kernel: by mx20.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: 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:87548 Archived-At: On 24 Jan 2008, at 4:07 PM, Dan Nicolaescu wrote: > >> wrong behaviour of vc-workfile-unchanged-p >> http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg00867.html > > The analysis in the bug report seems correct. > Opinions on this patch? > (this code has been around for a long time...) > > --- vc-hooks.el.~1.220.~2008-01-13 10:45:01.000000000 -0800 > +++ vc-hooks.el2008-01-23 23:01:02.000000000 -0800 > @@ -558,10 +558,11 @@ > (if (and checkout-time > ;; Tramp and Ange-FTP return this when they don't > know the time. > (not (equal lastmod '(0 0)))) > - (equal checkout-time lastmod) > - (let ((unchanged (vc-call workfile-unchanged-p file))) > - (vc-file-setprop file 'vc-checkout-time (if unchanged > lastmod 0)) > - unchanged)))) > + (if (equal checkout-time lastmod) > + t > + (let ((unchanged (vc-call workfile-unchanged-p file))) > + (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0)) > + unchanged))))) > > (defun vc-default-workfile-unchanged-p (backend file) > "Check if FILE is unchanged by diffing against the master version. > with the above changes, vc-workfile-unchanged-p will return nil when the test for the first if is false (and checkout-time ...). This vc will consider the file changed each time the checkout-time is not known. How about: Index: vc-hooks.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/vc-hooks.el,v retrieving revision 1.220 diff -u -p -r1.220 vc-hooks.el --- vc-hooks.el 8 Jan 2008 20:44:35 -0000 1.220 +++ vc-hooks.el 26 Jan 2008 07:45:06 -0000 @@ -557,11 +557,12 @@ and does not employ any heuristic at all (lastmod (nth 5 (file-attributes file)))) (if (and checkout-time ;; Tramp and Ange-FTP return this when they don't know the time. - (not (equal lastmod '(0 0)))) - (equal checkout-time lastmod) - (let ((unchanged (vc-call workfile-unchanged-p file))) - (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0)) - unchanged)))) + (not (equal lastmod '(0 0))) + (equal checkout-time lastmod)) + t + (let ((unchanged (vc-call workfile-unchanged-p file))) + (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0)) + unchanged)))) (defun vc-default-workfile-unchanged-p (backend file) "Check if FILE is unchanged by diffing against the master version. Cheers, Alex.