precommit hook that changes commit list?
Giorgos Keramidas
keramida at ceid.upatras.gr
Sat Sep 6 08:25:06 CDT 2008
On Sat, 6 Sep 2008 01:32:56 -0700, "Nicholas Tung" <ntung at ntung.com> wrote:
> Hello,
> I have a precommit hook script that will compile a LaTeX file before
> committing. I know some people feel storing generated files is messy,
> but with the web server, it's just too convenient. Is there a way to
> make Mercurial rescan the commit list to see that this generated file
> has changed before it commits?
Not really. Even if there was `changing' a commit on the fly is not
possible without modifying the changeset hashes and altering the repo
history.
> Or is there some script that would run whenever detecting changed
> files?
Why don't you build the files right _after_ commits? If you have a
build script called `mybuild.sh' then something like this would work:
[hooks]
changegroup = /home/keramida/tools/mybuild.sh
commit = /home/keramida/tools/mybuild.sh
# To rebuild after every "hg update" too, add:
# update = /home/keramida/tools/mybuild.sh
More information about the Mercurial
mailing list