[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: vc-revert-hook?
From: |
Marshall, Simon |
Subject: |
RE: vc-revert-hook? |
Date: |
Thu, 8 May 2008 09:09:42 +0100 |
> > Some time ago, vc.el used to have a vc-revert-hook. I used it to
cause a
>
> 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:
> >
> > (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.
>
> 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
-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=/repo/cvs
CVSREAD=read-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>
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 Oak,
Salford Priors, Evesham WR11 8SP. For a list of Misys group operating companies
please go to http://www.misys.com/html/about_us/group_operating_companies/.
This email and any attachments have been scanned for known viruses using
multiple scanners.
We believe that this email and any attachments are virus free, however 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 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 commencement
of legal relations between you and Misys plc. Please refer to the executed
contract between you and the relevant member of the Misys group for the
identity of the contracting party with which you are dealing.
- vc-revert-hook?, Marshall, Simon, 2008/05/07
- Re: vc-revert-hook?, Dan Nicolaescu, 2008/05/07
- RE: vc-revert-hook?,
Marshall, Simon <=
- Re: vc-revert-hook?, Dan Nicolaescu, 2008/05/08
- RE: vc-revert-hook?, Marshall, Simon, 2008/05/08
- Re: vc-revert-hook?, Stefan Monnier, 2008/05/08
- RE: vc-revert-hook?, Marshall, Simon, 2008/05/12
- Re: vc-revert-hook?, Stefan Monnier, 2008/05/12
- RE: vc-revert-hook?, Marshall, Simon, 2008/05/12
- Re: vc-revert-hook?, Stefan Monnier, 2008/05/12
- RE: vc-revert-hook?, Marshall, Simon, 2008/05/13
- Re: vc-revert-hook?, Stefan Monnier, 2008/05/13