下载 VisualSvnServer 设置其 强制输入log功能*hooks 的编写使用
操作步骤:
1.打开visualSVN Server
2.打开Repositories
3.右键需要控制的项目->所有任务->manage hooks...
4.选择Hooks tab,点击Pre-commit hook进入编辑界面
5.将以下的内容复制到输入框中
hook中的代码
@echo off
::
:: Stops commits that have empty log messages.
::
@echo off
setlocal
rem Subversion sends through the path to the repository and transaction id
set REPOS=%1
set TXN=%2
rem check for an empty log message
svnlook log %REPOS% -t %TXN% | findstr ".........." > nul
if %errorlevel% gtr 0 (goto err) else exit 0
:err
echo. 1>&2
echo 抱歉,由于您没有正确填写Log或者Log字数过少(必须大于10),系统拒绝提交! 1>&2
echo Log格式: 新增/修改/删除: 提交内容 1>&2
echo 请详细描述提交内容,然后再提交. -- 谢谢! 1>&2
exit 1
tips:上述命令中 findstr后的 ".........." 表示需要的字符长度
原文地址:http://9397153.blog.51cto.com/9387153/1553340