Alex Rivera | Logout

Share common / useful SVN pre-commit hooks

Asked 2009-05-19T19:31:24.403
40

What are some common and/or useful pre-commit hooks for SVN?

Edit
Report

3 Answers

13
  • Check for tabs and reject the check-in.
  • Check for inconsistent line endings and reject the check-in.
  • Check for occurance of "CR: [username]" and reject the check-in if there is no code review.
answered 2009-05-19T19:34:21.030
1

How about a hook to compile the project? e.g. Run make all. This ensures no one checks in code that doesn't compile! :)

answered 2009-11-20T09:16:56.963
0

I check for case collision (stupid windows) and also require-mergeinfo.pl to ensure that the client is at least 1.5 - that way svn:mergeinfo will always be set

answered 2010-11-20T03:49:00.790

Your Answer