On Feb 23, 2012, at 10:44 , Torsten Krah wrote:

> Am Mittwoch, den 22.02.2012, 14:53 -0500 schrieb Andy Levy:
>> Can pre-commit clean up after itself, so that the environment is clean
>> regardless of the result of the commit?
> 
> Hm no, the action should do some work (external system) and does need to
> know if commit was successful or if it failed.
> At pre-commit time i'll got all changes (what changes, is it valid etc.
> pp. - all the things which can be done in pre-commit) and can prepare
> them for an external system.
> Those changes, which were prepared at pre-commit time, need to be
> committed at success time in post-commit and reverted if it fails (which
> is missing at the moment) - as data should be consistent as possible,
> the failing info would be needed here.
> Details how it is done does not matter, use case is:
> 
> 1. At pre-commit prepare things for an external system
> 2. let svn do its work
> 3. At successful commit do this too for prepared work, if it failed,
> revert prepared things too.

Why not do 1 & 3 in a post-commit hook?

Have you measured how much time you save by running the external 
system early?

I suspect you won't save much.  For a large commit over a slow connection, 
there may be a few minutes' gap between start-commit and pre-commit.  
The gap between pre-commit and post-commit is usually short because the 
data is already on the server.

Regards,
Steve

> 
> Did this explanation help to understand the use case? any ideas how to
> do, or impossible at the moment?
> May a feature request at bug tracker help to get those feature?


Reply via email to