From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Marshall, Simon" Newsgroups: gmane.emacs.devel Subject: RE: vc-revert-hook? Date: Thu, 8 May 2008 09:09:42 +0100 Message-ID: <6EE216E1AA959543A555C60FF34FB767040F7D64@maileube01.misys.global.ad> References: <6EE216E1AA959543A555C60FF34FB767040B1D39@maileube01.misys.global.ad> <200805071829.m47ITlkV020399@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1210234324 1738 80.91.229.12 (8 May 2008 08:12:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 May 2008 08:12:04 +0000 (UTC) Cc: Andre Spiegel , emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 08 10:12:38 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 1Ju1Eq-0007ly-Ga for ged-emacs-devel@m.gmane.org; Thu, 08 May 2008 10:12:28 +0200 Original-Received: from localhost ([127.0.0.1]:41218 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ju1E8-0002Oa-C8 for ged-emacs-devel@m.gmane.org; Thu, 08 May 2008 04:11:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ju1E4-0002ND-Cg for emacs-devel@gnu.org; Thu, 08 May 2008 04:11:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ju1E3-0002MM-K1 for emacs-devel@gnu.org; Thu, 08 May 2008 04:11:40 -0400 Original-Received: from [199.232.76.173] (port=35391 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ju1E3-0002MC-Hf for emacs-devel@gnu.org; Thu, 08 May 2008 04:11:39 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:3901) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ju1Dx-0007XN-7f; Thu, 08 May 2008 04:11:33 -0400 Original-Received: from cluster-b.mailcontrol.com ([217.68.146.190]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ju1Dv-000318-Su; Thu, 08 May 2008 04:11:32 -0400 Original-Received: from rly09b.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly09b.srv.mailcontrol.com (MailControl) with ESMTP id m488AgTf031578; Thu, 8 May 2008 09:11:22 +0100 Original-Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly09b.srv.mailcontrol.com (MailControl) id m4889jA5026986; Thu, 8 May 2008 09:09:45 +0100 Original-Received: from maileube01.misys.global.ad ([217.196.233.105]) by rly09b-eth0.srv.mailcontrol.com (envelope-sender Simon.Marshall@misys.com) (MIMEDefang) with ESMTP id m4888X0i019843; Thu, 08 May 2008 09:09:45 +0100 (BST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: vc-revert-hook? Thread-Index: AciwcNygpqOSJ2akSSSD4wL/IAYo6gAb1ttA X-Scanned-By: MailControl A-08-50-00 (www.mailcontrol.com) on 10.66.1.119 X-detected-kernel: by mx20.gnu.org: Linux 2.4-2.6 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:96733 Archived-At: > > Some time ago, vc.el used to have a vc-revert-hook. I used it to cause a >=20 > Can you point out the version, or the exact name of the hook, a search > vc-revert-hook comes out empty... Hi Dan, sorry, my bad. Looking through some archives, it seems I had a conversation with Andre Spiegel in 2003, when I suggested adding it. I had a hacked version of vc.el to try it out, but it seems we didn't follow it to its conclusion and it didn't get put in emacs itself. > > subsequent recompilation - of a modified source file that I had then reverted > > via C-x v u (AKA M-x vc-revert-buffer) - by touching the source file: > >=20 > > (add-hook 'vc-revert-hook > > (lambda () > > (shell-command (concat "touch " buffer-file-name)))) > >=20 > > Without this, CVS (my backend VCS) or vc.el would leave the reverted source > > file with the timestamp of the reverted revision, ie, older than the modified > > file, and a dependency-based recompilation would be fooled into thinking that > > the source file's compiled object file was up-to-date. >=20 > Are you sure? A quick experiment showed that and after C-x v u the file > on disk had the time stamp set to the current time... > Can you replicate the problem with emacs -Q? Sure, with CVS: risksun2 104> ls -l Makefile=20 -r--r--r-- 1 marshals gcms 707 May 2 11:33 Makefile risksun2 105> pemacs -Q Makefile& [1] 12298 Where pemacs is my 22.2 + patches to cc-mode from Alan. In emacs, do C-x v v on Makefile, edit, save and: risksun2 106> ls -l Makefile -rw-r--r-- 1 marshals gcms 708 May 8 08:50 Makefile No surprise there. In emacs, do C-x v u on Makefile, confirm and: risksun2 107> ls -l Makefile -r--r--r-- 1 marshals gcms 707 May 2 11:33 Makefile As you can see, the original timestamp is restored on reversion. risksun2 108> env|grep CVS CVSROOT=3D/repo/cvs CVSREAD=3Dread-only risksun2 109> cvs -v Concurrent Versions System (CVS) 1.12.9 (client/server) Copyright (c) 1989-2004 Brian Berliner, david d `zoo' zuhn, Jeff Polk, and other authors CVS may be copied only under the terms of the GNU General Public License, a copy of which can be found with the CVS distribution kit. Specify the --help option for further information about CVS risksun2 110>=20 I verified that unsetting CVSREAD made no difference. Does this help? Thanks, Simon. "Misys" is the trade name for Misys plc (registered in England and Wales).= Registration Number: 01360027. Registered office: Burleigh House, Chapel O= ak, Salford Priors, Evesham WR11 8SP. For a list of Misys group operating c= ompanies please go to http://www.misys.com/html/about_us/group_operating_co= mpanies/. This email and any attachments have been scanned for known viruse= s using multiple scanners.=20 =20 We believe that this email and any attachments are virus free, however the = recipient must take full responsibility for virus checking. This email mess= age is intended for the named recipient only. It may be privileged and/or c= onfidential. If you are not the named recipient of this email please notify= us immediately and do not copy it or use it for any purpose, nor disclose = its contents to any other person. This email does not constitute the commen= cement of legal relations between you and Misys plc. Please refer to the ex= ecuted contract between you and the relevant member of the Misys group for = the identity of the contracting party with which you are dealing.=20