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 server to require commit messages to be non-empty?
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.
start-commit
— run before commit transaction begins, can be used to do special permission checkingpre-commit
— run at the end of the transaction, but before commit. Often used to validate things such as a non zero length log message.post-commit
— runs after the transaction has been committed. Can be used for sending emails, or backing up repository.pre-revprop-change
— runs before a revision property change. Can be used to check permissions.post-revprop-change
— runs after a revision property change. Can be used to email or backup these changes.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: