We\'ve got VisualSVN Server set up as our Subversion server on Windows, and we use Ankhsvn + TortoiseSVN as clients on our workstations.
How can you configure the se
Note: This Only Applies To TortoiseSVN
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.
Use this pre-commit hook on Windows. It's written in Windows Batch and uses grep command-line utility to check the commit length.
svnlook log -t "%2" "%1" | c:\tools\grep -c "[a-zA-z0-9]" > nul
if %ERRORLEVEL% NEQ 1 exit 0
echo Please enter a check-in comment 1>&2
exit 1
Remember that you'll need a copy of grep, I recommend the gnu tools version.
VisualSVN Server 3.9 provides the VisualSVNServerHooks.exe check-logmessage
pre-commit hook that helps you reject commits with empty or short log messages. See the article KB140: Validating commit log messages in VisualSVN Server for instructions.
Besides the built-in VisualSVNServerHooks.exe
, VisualSVN Server and SVN in general uses a number of hooks to accomplish tasks like this.
You need to use the pre-commit
hook. You can write it yourself in just about any language your platform supports, but there are a number of scripts on the web. Googling "svn precommit hook to require comment" I found a couple that looked like they would fit the bill:
The technical answers to your question have already been given. I'd like to add the social answer, which is: "By establishing commit message standards with your team and getting them to agree (or accept) reasons why one would need expressive commit messages"
I've seen so many commit messages that said "patch", "typo", "fix" or similar that I've lost count.
Really - make it clear to everybody why you'd need them.
Examples for reasons are:
Hope that helps, additionally to the technical answers about precommit hooks.