~ubuntu-branches/ubuntu/precise/trac/precise

« back to all changes in this revision

Viewing changes to contrib/trac-post-commit-hook.cmd

  • Committer: Bazaar Package Importer
  • Author(s): Luis Matos
  • Date: 2007-05-20 22:46:56 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20070520224656-3g5unjo0c4glevjh
Tags: 0.10.4-1
* New upstream release (Closes: #414134, #420219)
* Fixed typo in debian/copyright file (Closes: #422409)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
:: -- this one should be set if [project] url is not set in trac.ini
 
23
SET TRAC_URL=http://%COMPUTERNAME%:8080/%REPNAME%
 
24
 
 
25
:: -- set if Python is not in the system path
 
26
SET PYTHON_PATH=
 
27
 
 
28
:: -- set to the folder containing trac/ if installed in a non-standard location
 
29
SET TRAC_PATH=
 
30
:: ----------------------------------------------------------
 
31
 
 
32
:: Do not execute hook if trac environment does not exist
 
33
IF NOT EXIST %TRAC_ENV% GOTO :EOF
 
34
 
 
35
set PATH=%PYTHON_PATH%;%PATH%
 
36
set PYTHONPATH=%TRAC_PATH%;%PYTHONPATH%
 
37
 
 
38
SET REV=%2
 
39
 
 
40
Python "%~dp0\trac-post-commit-hook" -p "%TRAC_ENV%" -r "%REV%" -s "%TRAC_URL%"
 
41