设置SVN服务器允许修改日志
2014-05-28 22:55
316 查看
在使用SVN进行代码版本提交时,经常设置强制填写日志以便记录没次修改的内容,当时有时候需要修改log, 这个时候需要做下配置:
在版本库的hooks目录下加入一个批处理文件:pre-revprop-change.bat
内容如下,每行若存在空格,必须进行删除
@ECHO OFF
:: Set all parameters. Even though most are not used, in case you want to add
:: changes that allow, for example, editing of the author or addition of log messages.
set repository=%1
set revision=%2
set userName=%3
set propertyName=%4
set action=%5
:: Only allow the log message to be changed, but not author, etc.
if /I not "%propertyName%" == "svn:log" goto ERROR_PROPNAME
:: Only allow modification of a log message, not addition or deletion.
if /I not "%action%" == "M" goto ERROR_ACTION
:: Make sure that the new svn:log message is not empty.
set bIsEmpty=true
for /f "tokens=*" %%g in ('find /V ""') do (
set bIsEmpty=false
)
if "%bIsEmpty%" == "true" goto ERROR_EMPTY
goto :eof
:ERROR_EMPTY
echo Empty svn:log messages are not allowed. >&2
goto ERROR_EXIT
:ERROR_PROPNAME
echo Only changes to svn:log messages are allowed. >&2
goto ERROR_EXIT
:ERROR_ACTION
echo Only modifications to svn:log revision properties are allowed. >&2
goto ERROR_EXIT
:ERROR_EXIT
exit /b 1
在版本库的hooks目录下加入一个批处理文件:pre-revprop-change.bat
内容如下,每行若存在空格,必须进行删除
@ECHO OFF
:: Set all parameters. Even though most are not used, in case you want to add
:: changes that allow, for example, editing of the author or addition of log messages.
set repository=%1
set revision=%2
set userName=%3
set propertyName=%4
set action=%5
:: Only allow the log message to be changed, but not author, etc.
if /I not "%propertyName%" == "svn:log" goto ERROR_PROPNAME
:: Only allow modification of a log message, not addition or deletion.
if /I not "%action%" == "M" goto ERROR_ACTION
:: Make sure that the new svn:log message is not empty.
set bIsEmpty=true
for /f "tokens=*" %%g in ('find /V ""') do (
set bIsEmpty=false
)
if "%bIsEmpty%" == "true" goto ERROR_EMPTY
goto :eof
:ERROR_EMPTY
echo Empty svn:log messages are not allowed. >&2
goto ERROR_EXIT
:ERROR_PROPNAME
echo Only changes to svn:log messages are allowed. >&2
goto ERROR_EXIT
:ERROR_ACTION
echo Only modifications to svn:log revision properties are allowed. >&2
goto ERROR_EXIT
:ERROR_EXIT
exit /b 1
相关文章推荐
- SVN服务器搭建和使用(四)Svn 设置 修改 日志
- 终端服务器超出最大允许连接数|修改end a disconnected session设置
- 允许用户修改svn日志的钩子脚本
- 允许修改svn历史日志记录
- SVN上传日志允许修改
- VisualSVN:允许修改svn提交日志(pre-revpro-change hook)
- svn 客户端允许修改客户历史日志
- 设置SVN服务器强制填写日志
- 允许用户修改svn日志的钩子脚本
- 允许用户修改svn日志的钩子脚本
- 允许用户修改svn日志的钩子脚本
- VisualSVN:允许修改svn提交日志(pre-revpro-change hook)
- 设置svn强制写日志和日志可修改方法
- 只允许修改自己的svn日志的钩子脚本
- 在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接)
- 快速设置svn服务器
- IIS Web服务器已设置为允许匿名访问,但客户端仍然要求输入用户名和密码
- 在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败
- 在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接)
- mssql自动备份及自动清除日志文件服务器设置