摘自网页,做一下总结
一、设置没有日志不可提交:(来自http://www.cnblogs.com/lancidie/p/3142001.html)
1.打开visualSVN Server2.打开Repositories
3.右键需要控制的项目->所有任务->manage hooks...
4.选择Hooks tab,点击 Pre-commit hook进入编辑界面
5.将以下的内容复制到输入框中(注意路径)
@echo off
::
:: Stops commits that have empty log messages.
::
@echo off
set svnlook="<span style="color:#ff6666;">D:/Program Files/VisualSVN Server/bin/svnlook.exe"</span>
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 Your commit has been blocked because you didn't give any log message 1>&2
echo Please write a log message describing the purpose of your changes and 1>&2
echo then try committing again. -- Thank you 1>&2
exit 1
6、点击应用,就可以了。
二、设置日志可修改(来自http://jordan-micle.iteye.com/blog/1680510)
修改日志时遇到以下错误:
Repository has not been enabled to accept revision propchanges;
ask the administrator to create a pre-revprop-change hook
解决办法如下:
同一,在库的属性页面的Hooks选项卡下找到Pre-revision property change hook,双击修改其内容。
SET REPOS="%1"
SET REV="%2"
SET USER="%3"
SET PROPNAME="%4"
SET ACTION="%5"
IF %ACTION% == "M" (IF %PROPNAME% == "svn:log" (EXIT 0))
ECHO "Changing revision properties %PROPNAME% is prohibited" >&2
EXIT 1
应用就可以了。
ps:其实,以上输入代码会在对应的库文件的hooks目录下生成相应的脚本文件,本文对应的生成文件为:
pre-commit.cmd和pre-revprop-change.cmd,也可直接对其进行修改