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.

+1


source to share


3 answers


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 :)

+8


source


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.



0


source


The FreeBSD project has examples that you can use. See Posting the svn repo with hooks.

0


source







All Articles