How to implement SVN pre-commit hook with best performance?

Posted by mliebelt on Stack Overflow See other posts from Stack Overflow or by mliebelt
Published on 2010-01-12T17:22:15Z Indexed on 2010/03/20 0:31 UTC
Read the original article Hit count: 351

Filed under:
|

We have the following tools in place:

  • Subversion (Version 1.5.9)
  • Polarion (version 3.2.2)

Polarion is based on Subversion, so on every action that changes anything (which is often the case), Polarion will use a Subversion commit to change anything. All things are currently stored in one and only one repository, so every commit of every user (some 100-200 on the same repository) will trigger the pre-commit hook.

So what is the best strategy to provide pre-commit hooks that will

  • trigger only for some, but not all projects
  • run as fast as possible, because every pre-commit hook will block all other commits.

We have tried to implement pre-commit hooks with Java (using SVNKit), but this will start on every commit a Java VM. So any ideas how to implement that nicely?

© Stack Overflow or respective owner

Related posts about svn

Related posts about pre-commit-hook