Has anyone implemented a hook that requires developers to input x chars before successful submission? I've looked up hooks but don't really understand how to implement this one for Subversion using Tortoise specifically for a Windows Environment.
3 Answers
Simply right-click the top level of your Repository. In the context-menu select TortoiseSVN, then Properties, to see this dialog:
Click the New button near the bottom right, and select Log Sizes. Enter the number of characters you want to require for Commit and Lock (10 in example below).
Do a Commit from the top Level directory you just modified. Now your repository requires all users to Comment before Committing changes.

- 2,845
- 1
- 21
- 31
Try this which was taken from here
Note that using client side commit requirements can work as well if you have developers you trust.
EDIT:
Then try this? http://svn.haxx.se/users/archive-2006-05/0594.shtml http://blog.tfanshteyn.com/2007/11/subversion-pre-commit-hooks.html
-
hehe, trust developers to add a rule to enforce them to submit with comments! yea I wish the world was that simple and people were that dedicated and professional. :) – PositiveGuy Jul 31 '09 at 20:49
-
that is a perl script. I'm using Tortoise SVN on a windows Vista environment locally and Windows Server 2007 on our dev server. – PositiveGuy Jul 31 '09 at 20:55
-
I started reverting people's changes when they had no comments. That went a long way to letting them know I was serious. Sometimes comments are not necessary, sometimes a word or two is sufficient, but most times more is needed. – Tim Jul 31 '09 at 21:53
-
it's nice when you have that power, but most don't. – PositiveGuy Aug 03 '09 at 13:09
-
SO you have the authority to put on a server side script, but not revert? – Tim Aug 03 '09 at 13:43
If you are using JIRA together with Subversion, then use the Commit Policy add-on.
It can verify the number of characters in the commit messge with the condition named Commit message must match a pattern. Even better you can use a regex like this to count only the non-whitespace characters:
(?:\S|\S\s*){10,}
The add-on allows keeping all these rules in a central place (JIRA) and it offers several other conditions to check the committer person, the committed files and so on.
Disclaimer: this is a commercial add-on, and I'm a developer working on it.

- 307
- 1
- 4