At my place of work we've started to introduce proper SVN hooks, "proper" meaning "doing a lot of policy checking". Currently, our policy consists of Perl::Critic with Perl::Tidy checking enabled. However, especially the latter one takes a lot of time on commits with several to many files touched and SVN wouldn't return until the post-commit hook is done.
Is there any way I can save some time in the post-commit hook without sacrificing policy checks?
If you only need some report (like list of errors) then you can use Continious Intergation system run some post commit actions. This systems allow to put any action after changes in your source control system made. Here is example scenario:
There are many good Continious Intergation system. I like Hudson.
This is another place where branch-based development can be useful. Essentially you create a new branch for each task you want to do. The branch is exempt from the quality checks, but the merge to trunk or whatever is not. So your day-to-day commits are fast, and it's only slow to merge. And you can reduce the pain of that by putting together a bot to do that task for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With