整合mantis和svn
原地址:http://nubix.javaeye.com/blog/745447
mantis通过core/checkin.php 即可在svn提交的同时把问题标记为解决!
1. svn -> pre-commit.bat
- @echo off
- setlocal
- set REPOS=%1
- set TXN=%2
- set DETAILS_FILE=D:\svn.log
- svnlook log "%REPOS%" -t "%TXN%" > %DETAILS_FILE%
- php -f D:\mantis\core\checkin.php < %DETAILS_FILE%
- exit 0
2. mantis -> config_inc.php
- $g_source_control_account = 'svn'; #新建一个帐号,权限设定为开发人员
- $g_source_control_notes_view_status = VS_PRIVATE;
- $g_source_control_set_status_to = OFF; #不同时改变状态
- $g_source_control_regexp = "/fix [#]{0,1}(\d+)/i";
- $g_source_control_set_status_to = 80; #80代表RESOLVED,已解决
- $g_source_control_fixed_regexp = "/fix [#]{0,1}(\d+)/i";