分享Visual SVN Hook Script—— 提交时必须输入log信息

来源:互联网 发布:漫步者煲音箱软件 编辑:程序博客网 时间:2024/05/22 10:32

pre-commit.cmd


@echo off::    :: Stops commits that have empty log messages.::@echo offsetlocalrem Subversion sends through the path to the repository and transaction idset REPOS=%1set TXN=%2rem check for an empty log messagesvnlook log %REPOS% -t %TXN% | findstr . > nulif %errorlevel% gtr 0 (goto err) else exit 0:errecho. 1>&2echo Your commit has been blocked because you didn't give any log message 1>&2echo Please write a log message describing the purpose of your changes and 1>&2echo then try committing again. -- Thank you 1>&2exit 1


原创粉丝点击