svnnotificationshookvisualsvn-serversvn-hooks

How to require commit messages in VisualSVN server?


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?


Solution

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