码迷,mamicode.com
首页 > Windows程序 > 详细

Windows Pre-commit hook for comment length Subversion

时间:2017-02-09 23:52:43      阅读:362      评论:0      收藏:0      [点我收藏+]

标签:comm   level   windows   got   use   echo   goto   log   mit   

@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           

 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 enter a comment. 1>&2  
 echo Write a log message describing the changes made and try again. 1>&2
 echo Thanks 1>&2
 exit 1

http://stackoverflow.com/questions/869248/windows-pre-commit-hook-for-comment-length-subversion

Windows Pre-commit hook for comment length Subversion

标签:comm   level   windows   got   use   echo   goto   log   mit   

原文地址:http://www.cnblogs.com/hydonlee/p/6384401.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!