[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Which hook to check-in an automatically built ChangeLog?

From: Patrick Ben Koetter <p_at_state-of-mind.de>
Date: 2004-12-20 23:10:33 CET

* Garrett Rooney <rooneg@electricjellyfish.net>:
> >Here's what I want to have:
> >+ The ChangeLog should include my current commit.
> >+ The ChangeLog should be committed together with my current commit.
> >
> >To me it looks as if "start-commit" is the right hook, because it "is
> >run before the commit transaction is even created".
> >
> >Or is it "pre-commit", because it "is run when the transaction is
> >complete, but before it is committed"?
> You can't do that. Neither start-commit or pre-commit can modify the
> contents of the transaction, because the change has no way to be
> communicated back to the client, so you would end up with a working copy
> that thought it was up to date with the new revision you're committing
> to the repository, but in actuality is not. There are warnings in the
> hook script templates about this problem.

A paradoxon. A "back to the future" problem... ;-)
I had something like this on my mind and that's why I asked.

> The best you can do is have a post-commit hook script modify and
> commit the ChangeLog, but you need to be sure that it doesn't fire on
> the commits it is performing, to avoid infinite loops.

So I would end up with two commits per regular commit. That sounds fishy
to me and would break a lot of revision number logic and would require
some workaround in order not to have the ChangeLog commit appear in the

Hmmm, I think that would add confusion where I was aiming for automated

I'll probably do a post-commit for the Changelog only, but not add it
automatically afterwards.

Just out of curiosity: The current hooks cannot do this. Would it
theoretically be possible to add another event (hook) to get what I am
looking for?

Something like a hidden commit for the ChangeLog? But that would break
the whole idea of a versioning system...


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Dec 20 23:13:23 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.