The example pre-commit.tmpl script in the hooks/ folder of your repository already does this :) Worth having a look in case there's any specific messages you want in there, but it does the job already, just remove the .tmpl from the end and it should work for you or even better copy it then remove the extension from the copy in case you need to edit it.
Hope that helps.
Currently I am using IBM BPM for my source code maintains. I am planning to move BPM source code to Subversion.
[TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 98"]
[TD="width: 131"]We provide guarantee to pass [url=http://www.learnalanguage.com/learn-english/]learnalanguage - learn english[/url] gmat with online exam training [url=http://www.learnalanguage.com/learn-norwegian/]learnalanguage - learn norwegian[/url] itil and you can also get best quality [url=www.rosettastone.com]rosettastone [/url] mcat along with [url=http://polyglotclub.com/]The Polyglot Club[/url] mcat for your guaranteed success.[/TD]