Edgewall Software

Ticket #897: post-commit.bat

File post-commit.bat, 759 bytes (added by ivanoe, 7 years ago)

hooks\post-commit.bat on Windows to support TRAC integration

Line 
1SET REPOS=%1
2SET REV=%2
3
4::-----------------------------
5::Call the TRAC post-commit hook
6::
7SET TRAC_ENV=D:\ivanoe\work\testTRAC.db
8SET LOG_FILE=%TEMP%.\svnfileR-%REV%
9SET AUT_FILE=%TEMP%.\svnfileA-%REV%
10
11svnlook log -r %REV% %REPOS%>%LOG_FILE%
12svnlook author -r %REV% %REPOS%>%AUT_FILE%
13
14:: SET THE AUTHOR FROM THE FILE. The file is expected to contain only one line with this value
15FOR /F %%A IN (%AUT_FILE%) DO SET AUTHOR=%%A
16
17python D:\tools\trac-0.8pre\contrib\trac-post-commit-hook -p "%TRAC_ENV%" -r "%REV%" -u "%AUTHOR%" -m "file:%LOG_FILE%"
18DEL %LOG_FILE%
19DEL %AUT_FILE%
20::
21::-----------------------------
22
23::commit-email.pl "$REPOS" "$REV" commit-watchers@example.org
24::log-commit.py --repository "$REPOS" --revision "$REV"