??????????????????ù????л??????Щ????
????1????????????????????????????????????????
????2????????????????????????????????????????????????
????????????????????????????????????У??
??????????? pre-commit.bat У??????
REM pre-commit.bat hook for MantisBT integration
set REPOS=%1
set TXN=%2
SET DETAILS_FILE=D:svn o1logsvnfile
SET LOG_FILE=D:svn o1logsvnfile_Log
set APR_ICONV_PATH=D:EasyPHPSubversioniconv
set PHPRC=D:EasyPHPapache
set path=%path%;D:EasyPHPphp5;D:EasyPHPSubversionin;
rem ????????д?? DETAILS_FILE
svnlook log "%REPOS%" -t "%TXN%"  >>%DETAILS_FILE%
rem ???checkin_svn_pre_commit.php ????У???????? ???????????д?????????????????????????? log_file??
php.exe D:EasyPHPwwwmantiscorecheckin_svn_pre_commit.php <%DETAILS_FILE%>%LOG_FILE%
rem У??log_file????????????????????????????????
FOR /F "tokens=1??2* delims= " %%i in (%LOG_FILE%) do goto err
del %DETAILS_FILE%
del %LOG_FILE%
exit 0
:err
echo ??????????????????д????????????! 1>&2
del %DETAILS_FILE%
del %LOG_FILE%
exit 1
????????????checkin_svn_pre_commit.php ?????????У?????????
???????? checkin.php ???? ???checkin_svn_pre_commit.php ???
??? # add note to each bug only once ????? exit( 0 ); ?????????????????
# add note to each bug only once
$t_issues = array_unique( $t_issues );
$t_fixed_issues = array_unique( $t_fixed_issues );
$t_issues_svn = array_unique( $t_issues );
# ???????.
$t_comment = mb_convert_encoding($t_comment?? "utf-8"??"GB2312");
# ?ж???????е? ????????????
foreach ( $t_issues_svn as $t_issue_id ) {
$query = "SELECT *
FROM mantis_bug_table
WHERE bug_text_id='$t_issue_id'";
$result = db_query( $query );
$issues_raw_count = db_num_rows( $result );
if ($issues_raw_count  == 0){
echo "$t_issue_id";
}
}
exit( 0 );
??????????????????????????????????Щ????
????1 ???????????????????????г??????? issue ?????????????????????????
????????????????????????????? issue 1 ??????д???????????????
?????????????
????1??
????SET DETAILS_FILE=E:svnrepologsvnfile_%REV%
?????????svn???????????????????? ???????log????????????????????
????2??
????$g_source_control_account = 'SVN';
?????????mantis??????? svn?? ????????????????????????
????3??php.exe E:wwwmantiscorecheckin.php <%DETAILS_FILE% >%LOG_FILE%
?????????easyphp????????php.ini ?????????windows???μ??
????rem set PHPRC=D:EasyPHPapache ???????windows ???μ? php.ini ??????? easyphpapach ???μ????????
???????????mysql ???????