要集成Mantis和SVN,需要几个工具:
SVN客户端,有个windows下的很不错的工具,TortoiseSVN,完全集成在explorer里,下载地址: http://tortoisesvn.net/
SVN服务端,这个应该都有吧。
Mantis缺陷跟踪系统,用php开发。轻量级的缺陷跟踪系统。 http://www.mantisbt.org/
首先先在TortoiseSVN里设置一下项目的属性,右键点击目录,属性,在subversion一栏里,加入这几个属性
bugtraq:label = issuebugtraq:url = http://<mantisserver>/mantis/view.php?id=%BUGID%bugtraq:message = issue %BUGID%bugtraq:warnifnoissue = true
到对应的SVN版本库里,找到hooks目录,建立一个post-commit.bat文件,将以下内容拷入:
REM Post-commit hook for MantisBT integrationSET REPOS=%1SET REV=%2SET DETAILS_FILE=E:/svnrepo/log/svnfile_%REV%SET LOG_FILE=E:/svnrepo/log/svnfile_%REV%_Logset APR_ICONV_PATH=F:/software/svn-win32-1.4.2/iconvset path=%path%;e:/software/php;F:/software/svn-win32-1.4.2/bin;
echo ****** Source code change ******>>