Am 22.02.2012 18:27, schrieb Ryan Schmidt:

On Feb 22, 2012, at 09:23, Torsten Krah wrote:

the http://svnbook.red-bean.com/en/1.6/svn.ref.reposhooks.html book
tells about the various post-* hooks.
But those one are called on "successfull" operations.
Whats the way to implement a hook, which is called after commit - it
does not matter if successful or failed - the hook must be able to
figure out if all went fine or something went wrong.

Can this be done or is this not possible at the moment?

I don't think this is possible. You have the pre-commit hook, which fires 
before the commit; you can examine the commit and reject it at that time if 
desired. Assuming you don't reject it, the commit goes to Subversion's engine 
which writes it to the repository. Then it calls the post-commit hook, where 
you can do additional operations like send email notifications about the commit.

What circumstance to you envision in which the commit is not successful, and 
what automated action do you intend to perform as a result?


If commit can not fail - for which ever reason - why the doc does state that the hook does only run if the commit is actual successful?
So it is possible to fail or not?

I need to be sure that prepared external resources from pre-commit are cleaned up - even in case it did fail. If it would be run only on success, which does imply that it might fail, i am unable to clean up my work done in pre-commit.

any other ideas how to do?

Attachment: smime.p7s
Description: S/MIME Kryptografische Unterschrift

Reply via email to