Windows + VisualSVN Server + Trac 0.12
I want, that tickets automatic close, when commit text have “close #2” (or other command, all the same)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well my friend you are in luck becuase I finally figured out how to do this. I have the same configuration as you, Windows + VisualSVN + Trac.
This is what I have gathered and put together from a bunch of places on the net and my experience.
Here we go.
Install VisualSVN.
Create (import…) your repository. Just make sure it is there and working properly with VisualSVN. We will call your project TheProject. And say it is located in PathToSVN.
Which means if project is in C:\SVN\TheProject. Then PathToSVN is C:\SVN
Make sure you have at least one user if you use Subversion authentication.
Download VisualSVN Trac add-on from: http://www.visualsvn.com/files/VisualSVN-Server-2.5.4.28066-Trac-0.12.3.zip.
N.B. Check http://www.visualsvn.com/server/trac/ if there is a newer version but come back and follow the instructions here. Not the ones there.
Unzip it to %VISUALSVN_SERVER% folder (your VisualSVN installation folder)
Create a folder somewhere for you Trac. e.g. C:\Trac or D:\Trac. We will call it PathToTrac\
Allow “Full Control” access to PathToTrac\ folder for built-in Network Service account (or other account that is used to run VisualSVN Server’s service).
Open the command prompt and execute the command
“%VISUALSVN_SERVER%trac\trac-admin.bat” PathToTrac\TheProject initenv
Use the default settings. Just press enter for all questions.
Execute the following command to add TheProject Subversion repository to the Trac:
“%VISUALSVN_SERVER%trac\trac-admin.bat” PathToTrac\TheProject repository add TheProject PathToSVN\Project svn
If you don’t have python already, Add system variable: PYTHONHOME=%VISUALSVN_SERVER%trac\python
Just make sure PYTHONHOME points to somewhere where we can find python.
And look out for spaces at the end of the path. Windows doesn’t like it.
Add the following text to file %VISUALSVN_SERVER%conf\httpd-custom.conf if you use Subversion authentication:
or this text if you use Windows authentication:
MAKE SURE to replace PathToSVN and PathToTrac with the proper paths. In the texts
Restart VisualSVN server. Note down the port where the server is listening at.
Open “http://localhost:port/trac/” If you can see the Trac for your repository you are almost done. Otherwise go back and check if you have missed anything.
Go to your SVN directory and then to your project. PathToSVN\TheProject. e.g. C:\SVN\FirstProject. And you will find a folder name hooks. And in that folder you will find a file name post-commit.cmd. If it is not there then create it.
Add this to post-commit.cmd (just open it with a text editor) and save it.
Download the trac-post-commit-hook file from http://trac.edgewall.org/attachment/wiki/TracMultipleProjects/ComprehensiveSolution/trac-post-commit-hook.
Just go to the bottom of the page and click download original.
Save it in PathToSVN\TheProject\hooks directory.
It should be named trac-post-commit-hook no extension.
Now go to PathToTrac\TheProject\conf directory and open the file trac.ini. Search for repository_dir. Add tht path to your repository as it’s value e.g.
You are Done!!!
Now you can close or reference tickets directly from your commits like, fixes #1, closes #1 … Read the comments in the trac-post-commit-hook file