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: vc-revert-hook? Date: Wed, 7 May 2008 10:12:09 +0100 Message-ID: <6EE216E1AA959543A555C60FF34FB767040B1D39@maileube01.misys.global.ad> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8B022.6E742532" X-Trace: ger.gmane.org 1210151588 3491 80.91.229.12 (7 May 2008 09:13:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 May 2008 09:13:08 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 07 11:13:42 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 1JtfiP-0001m0-T7 for ged-emacs-devel@m.gmane.org; Wed, 07 May 2008 11:13:34 +0200 Original-Received: from localhost ([127.0.0.1]:47960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jtfhi-0002IM-6Y for ged-emacs-devel@m.gmane.org; Wed, 07 May 2008 05:12:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JtfhZ-0002Fb-GU for emacs-devel@gnu.org; Wed, 07 May 2008 05:12:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JtfhV-0002Au-9p for emacs-devel@gnu.org; Wed, 07 May 2008 05:12:40 -0400 Original-Received: from [199.232.76.173] (port=60060 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtfhU-0002Aa-U7 for emacs-devel@gnu.org; Wed, 07 May 2008 05:12:37 -0400 Original-Received: from cluster-a.mailcontrol.com ([80.69.8.190]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JtfhS-0004ze-EZ for emacs-devel@gnu.org; Wed, 07 May 2008 05:12:36 -0400 Original-Received: from maileube01.misys.global.ad ([217.196.233.105]) by rly29a.srv.mailcontrol.com (MailControl) with ESMTP id m479BDNb006918 for ; Wed, 7 May 2008 10:12:13 +0100 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: AciwIm3ZawzDCVrMSM2ooHQkLOHI2A== X-Scanned-By: MailControl A-08-00-05 (www.mailcontrol.com) on 10.65.0.139 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:96671 Archived-At: This is a multi-part message in MIME format. ------_=_NextPart_001_01C8B022.6E742532 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Some time ago, vc.el used to have a vc-revert-hook. I used it to cause a 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: (add-hook 'vc-revert-hook (lambda () (shell-command (concat "touch " buffer-file-name)))) 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. Possibly this wasn't the best way of solving this problem even then. However, it's not available anymore. Would this hook be a good feature to put back in or is there a better way to solve this particular problem? 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 ------_=_NextPart_001_01C8B022.6E742532 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable vc-revert-hook?

Some time ago, vc.el = used to have a vc-revert-hook.  I used it to cause a subsequent recomp= ilation - of a modified source file that I had then reverted via C-x v u (A= KA M-x vc-revert-buffer) - by touching the source file:

  (add-hook 'vc-= revert-hook
            (lambda ()
              (shell-command (conca= t "touch " buffer-file-name))))

Without this, CVS (my= backend VCS) or vc.el would leave the reverted source file with the timest= amp of the reverted revision, ie, older than the modified file, and a depen= dency-based recompilation would be fooled into thinking that the source fil= e's compiled object file was up-to-date.

Possibly this wasn't = the best way of solving this problem even then.  However, it's not ava= ilable anymore.

Would this hook be a = good feature to put back in or is there a better way to solve this particul= ar problem?

Simon.



"Misys" is the trade na= me for Misys plc (registered in England and Wales). Registration Number: 01= 360027. Registered office: Burleigh House, Chapel Oak, Salford Priors, Eves= ham WR11 8SP. For a list of Misys group operating companies pleas= e go to http://www.misys.com/html/about_us/group_operating= _companies/. <= SPAN style=3D"COLOR: #999999; FONT-FAMILY: Arial">This em= ail and any attachments have been scanned for known viruses using multiple = scanners.
<= /o:p> 
<= SPAN lang=3DEN-US style=3D"FONT-SIZE: 10pt; COLOR: #707176; FONT-FAMILY: Ar= ial">= We believe that this email and any attachments are virus free, h= owever the recipient must take full responsibility for virus checking. This email message is intended for the named recipient only.= It may be privileged and/or confidential. If you are n= ot the named recipient of this email please notify us immediately and do no= t copy it or use it for any purpose, nor disclose its contents to any other= person. This email does not constitute the commencement of legal relations= between you and Misys plc. Please refer to the executed contract between y= ou and the relevant member of the Misys group for the identity of the = contracting party with which you are dealing. 

   

= ------_=_NextPart_001_01C8B022.6E742532--