> I am setting up a subversion + apache + trac (0.11b2) + build server and
> I am having problems getting the subversion -> trac intergration working
> properly (or even at all).
I'm running SVN and Trac on a Windows box. Here's what I've got for
working for me. I'm sure the formatting will be totally mangled by
posting here, but hopefully you can make it out. I've substituted
"xxx" for all the site-specific stuff. The svnnotify file is just a
handy utility for sending emails upon SVN commits. It's a perl script
that's called by a batch file. Google on SVN::Notify if you interested
in that.
POST-COMMIT.BAT:
@echo off
set REPOSITORY=%1
set REVISION=%2
set PATH=c:\windows\system32;c:\windows;c:\progra~1\collab~1;c:
\python25;c:\perl\bin
set COMSPEC=c:\windows\system32\cmd.exe
set OS=Windows_NT
set SYSTEMROOT=c:\windows
call c:\perl\site\bin\svnnotify.bat --repos-path %REPOSITORY% -r
%REVISION% --revision-url "http://svn.xxx.com:8000/xxx/changeset/%%%
%s" --subject-prefix "[SVN] " --from "SVN <[EMAIL PROTECTED]>" --smtp
mail.xxx.com --handler HTML::ColorDiff --with-diff --to [EMAIL PROTECTED]
call C:\trac\trac-post-commit-hook.cmd %REPOSITORY% %REVISION% c:
\trac\xxx
The trac-post-commit-hook.cmd is just from the trac repository as I
recall but I'll show it here so you can see what I'm using:
TRAC-POST-COMMIT-HOOK.CMD:
@ECHO OFF
::
:: Trac post-commit-hook script for Windows
::
:: Contributed by markus, modified by cboos.
:: Usage:
::
:: 1) Insert the following line in your post-commit.bat script
::
:: call %~dp0\trac-post-commit-hook.cmd %1 %2 %3
::
:: 2) Check the 'Modify paths' section below, be sure to set at
least TRAC_ENV
:: ----------------------------------------------------------
:: Modify paths here:
:: -- this one *must* be set
SET TRAC_ENV=%3
:: -- set if Python is not in the system path
SET PYTHON_PATH=c:\python25
:: -- set to the folder containing trac/ if installed in a non-
standard location
SET TRAC_PATH=c:\progra~1\trac
:: ----------------------------------------------------------
:: Do not execute hook if trac environment does not exist
IF NOT EXIST %TRAC_ENV% GOTO :EOF
set PATH=%PYTHON_PATH%;%PATH%
set PYTHONPATH=%TRAC_PATH%;%PYTHONPATH%
SET REV=%2
Python "%~dp0\trac-post-commit-hook" -p "%TRAC_ENV%" -r "%REV%"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---