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

Re: Automatic replacement on commit

From: John Peacock <john.peacock_at_havurah-software.org>
Date: Tue, 09 Sep 2008 09:58:44 -0400

Roth, Pierre wrote:
>> * using a post commit-hook that will fire a process that
>> will automatically update the file and then commit it again?
> You'll probably have to use a pre-commit hook instead of a post-commit
> one. Just before committing, your script will change the file header and
> on success, the file (or list of files) will be commited.

No, that isn't a supported model. If you change the file in pre-commit,
then the working copy that made that commit contains the wrong data
(i.e. what it sent is not what was committed) and there is no way to
resolve that error.

The choice is either:

1) validate the data in a pre-commit hook and refuse the commit if it
doesn't checkout fine;

2) do as the OP suggested and update the file in post-commit and commit
that as an independent change.


To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-09 15:59:09 CEST

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.