Prevent SVN from being passed without description
I have an SVN repository and I need commits to fail if no description has been entered. Is this possible, preferably server side? (Users use several different tools to interact with the repository, although if it was possible client-side in TortoiseSVN it would ease the problem)
Google didn't help much, can you give me some pointers?
Thank.
source to share
Yup, you'll want to check in the repository for a pre-commit hook that didn't follow the appropriate error message to post back to the client.
If you look in the "hooks" directory of the newly created repository, you will find a pre-commit.tmpl
. This contains instructions, and the sample even verifies that the log message contains text - exactly what you want.
So you should be able to rename pre-commit.tmpl
to pre-commit
and make it executable and then give it a twist. I suggest you try it out in the sandbox repository before building the product to avoid angry users who can't commit until you get it right :)
source to share
You can do this using repository bindings . In your case, you want to use a pre-commit binding, which will validate the message and reject the commit if it is empty.
source to share