One of my earlier posts about forcing SVN comments talks about doing a pre-commit hook on SVN before every commit is made. The problem with that is, it needs to be done on the SVN server and not always you’ve got access to that. But as a developer you can force yourself to always comment before committing, as well. This one is particulary to do with TortoiseSVN as thats what I currently use at work.
The way it works is, once you have checked out a folder from the repository onto your local machine, you need to go to TortoiseSVN properties and add an inbuilt property to one or all your files. You can setup a property on one or more files so that it wont let you commit unless you write a minimum number of characters as my commit comments. The property is called tsvn:logminsize and it comes along with a set of other inbuilt properties. Simply right click anywhere in the checked out folder and go to TortoiseSVN Properties and add the property called tsvn:logminsize and give it a value of whatever you want. I gave it 10 (screenshot below).
I added the property recursively so it applies to all my files. Once thats done, it wont even enable the “OK” button on the commit dialog box until you enter atleast 10 characters. Just a little reminder to myself that commenting is absolutely necessary.
I didnt realize this was possible until today and I am really liking it.