3
:: Trac post-commit-hook script for Windows
5
:: Contributed by markus, modified by cboos.
9
:: 1) Insert the following line in your post-commit.bat script
11
:: call %~dp0\trac-post-commit-hook.cmd %1 %2
13
:: 2) Check the 'Modify paths' section below, be sure to set at least TRAC_ENV
16
:: ----------------------------------------------------------
19
:: -- this one *must* be set
22
:: -- this one should be set if [project] url is not set in trac.ini
23
SET TRAC_URL=http://%COMPUTERNAME%:8080/%REPNAME%
25
:: -- set if Python is not in the system path
28
:: -- set to the folder containing trac/ if installed in a non-standard location
30
:: ----------------------------------------------------------
32
:: Do not execute hook if trac environment does not exist
33
IF NOT EXIST %TRAC_ENV% GOTO :EOF
35
set PATH=%PYTHON_PATH%;%PATH%
36
set PYTHONPATH=%TRAC_PATH%;%PYTHONPATH%
40
Python "%~dp0\trac-post-commit-hook" -p "%TRAC_ENV%" -r "%REV%" -s "%TRAC_URL%"