Software Freedom Law Center

root/trunk/trac/contrib/trac-post-commit-hook.cmd

Revision 46, 0.9 kB (checked in by bkuhn, 11 months ago)

I am keeping a temporary fork of trac as I work on various changes to
it. I'll be coordinating with their mailing list soon.

Line 
1 @ECHO OFF
2 ::
3 :: Trac post-commit-hook script for Windows
4 ::
5 :: Contributed by markus, modified by cboos.
6
7 :: Usage:
8 ::
9 :: 1) Insert the following line in your post-commit.bat script
10 ::
11 :: call %~dp0\trac-post-commit-hook.cmd %1 %2
12 ::
13 :: 2) Check the 'Modify paths' section below, be sure to set at least TRAC_ENV
14
15
16 :: ----------------------------------------------------------
17 :: Modify paths here:
18
19 :: -- this one *must* be set
20 SET TRAC_ENV=
21
22 :: -- set if Python is not in the system path
23 SET PYTHON_PATH=
24
25 :: -- set to the folder containing trac/ if installed in a non-standard location
26 SET TRAC_PATH=
27 :: ----------------------------------------------------------
28
29 :: Do not execute hook if trac environment does not exist
30 IF NOT EXIST %TRAC_ENV% GOTO :EOF
31
32 set PATH=%PYTHON_PATH%;%PATH%
33 set PYTHONPATH=%TRAC_PATH%;%PYTHONPATH%
34
35 SET REV=%2
36
37 Python "%~dp0\trac-post-commit-hook" -p "%TRAC_ENV%" -r "%REV%"
38
Note: See TracBrowser for help on using the browser.

SFLC Main Page

[frdm] Support SFLC