Does anybody know how to prevent commits to a Subversion code repository when there is no commit comment entered?
相关问题
- How can I set the SVN password with Emacs 23.1 bui
- Outlook Object Model - Hooking to the Conversation
- If statements in .htaccess files, to enable passwo
- How to get a slug name for a page without creating
- SVN+SSH checkout over VPN using tortoise SVN, Smar
相关文章
- Is there a version control system abstraction for
- Intermittent “SVNException: svn: E175002: Connecti
- IntelliJ Subversion Authentication Required Dialog
- TortoiseHG and hgsubversion (Windows): “no module
- Incompatible JavaHl library loaded
- Native hooking in Android Client
- TFS vs. JIRA/Bamboo/SVN [closed]
- converting svn repo to git using reposurgeon
Create a pre-commit hook. Here's some instructions on how to do so yourself, or here is an example hook script that will reject anything with a commit message shorter than 10 characters.
If you are using TortoiseSVN only then you can add TortoiseSVN's property to the root directory: property name:
tsvn:logminsize
value:1
This will disable OK button in TortoiseSVN commit window then Message is empty. Please be aware that this property is TortoiseSVN specific it might not work with other SVN client.Actually, when you create a Subversion repository, its
hooks
subdirectory already contains hook samples. Check out the one calledpre-commit.tmpl
for details on the hook's parameters. It also contains an example for a hook that you're looking for:You can write your hook in any script or language, as long as it's executable on your Subversion machine.
Linux script for more than 15 characters--
Source-http://java.dzone.com/articles/useful-subversion-pre-commit
You can use a hook (put it into
<repository>/hooks
and name itpre-commit.bat
(Windows)):src: http://www.anujgakhar.com/2008/02/14/how-to-force-comments-on-svn-commit/
Here is a pre-commit hook with @miku's detailed error message for Linux: