Monday 10 November 2008

Pre-commit code review with subversion

Pre-commit code review with subversion

I want to impose(?) a review system in my current employee like the one that Google use with Mondrian. In that setup people cannot commit if their change they are doing it isn't approved.
So it seem obvious that the SCM needs to talk with the review system and ask if the commit is already approved and if it isn't just don't let the commit to proceed.








1 comment:

Unknown said...

Hello Raul,

I`m trying to use your pre-commit code, but I`m getting the following error:

Some of selected resources were not committed.
svn: Commit failed (details follow):
svn: Commit blocked by pre-commit hook (exit code 2) with output:
File "/.../hooks/precommit_hook.py", line 50
if review_extensions = None:
^
SyntaxError: invalid syntax

I installed as said in the file. I`m using Ubuntu 8.04 Hardy, Python 2.5, is that ok?

Do you have any ideas, what I`m doing the wrong way?
Thanks a lot.