Reading the changelog of the new release 0.4.0 of StatSVN, I wanted to test the Trac integration:
Applied patch for [ 1639462 ] Added TRAC Support. Fixes 1639462. Thanks to Jean-Francois Burdet.
But no mention about it in the manual how to configure it and how to use it...
I tried to add the option -trac http://myTracurl to the command line of the statsvn.jar:
java -mx256m -jar statsvn.jar changelog.xml C:\DevTree\src\trunk -output-dir .\statshtml -trac http://tracserver:8080/Trac
Ok, it has runned without any errors, but how to see now something on the Trac site?
The integration is unidirectional. The HTML pages generated by StatSVN will now point to Trac but Trac itself will not include StatSVN unless you configure it to!
I see indeed Trac links inside the statsvn html pages.
But when clicking on these links, I get errors in the trac site:
For example, when going to a specific developer, Activity in Directories, you see a link 'Browse with Trac'.
This url is linked to : http://tracserver:8080/Trac/browser/SQLTool.root/SQLTool/SQLToolExe/SQLXMLDataFiles/
When clicking on this url, I get:
No node /SQLTool.root/SQLTool/SQLToolExe/SQLXMLDataFiles at revision 2871
Indeed, the url is not correct. When you browse the code directly in Trac, we see the url:
So I did change the option url to :
java -mx256m -jar statsvn.jar changelog.xml C:\DevTree\src\trunk -output-dir .\statshtml -trac http://tracserver:8080/Trac/src/trunk
But this gives another error:
No handler matched request to /src/trunk/browser/SQLTool.root/SQLTool/SQLToolExe/SQLXMLDataFiles/
Now that I look at this a bit more closely, I do recall running into similar issues with ViewVC a long time ago. I'm not the best to answer this because I can't test right now, but here are my thoughts...
You need to have two things in synch:
a) the checked out folder path on which StatSVN operates on
b) the root folder inside Trac
I believe you have a src folder in the root of your subversion server. In these you probably have the typical /tags, /trunk, /branches (as /src/tags, /src/trunk, /src/branches).
You probably checked out your whole repository in c:\devtree\, meaning it has c:\devtree\src\trunk and c:\devtree\bin\trunk, possibly. You're running StatSVN on a portion of this (/src/trunk only) - therefore it assumes nothing else exists and assumes the root it is using to build your URLs will be the same on your Trac. (It assumes that the only thing Trac has it's / configured as /src/trunk.) However, your trac is configured to have its root / at the real / of the subversion server, and that's why there are problems.
run statsvn on c:\devtree - you will get stats for branches, tags, etc. not very good.
change trac to have its root at /src/trunk.. but maybe you can't do this or don't want to do it.
we enhance our bug tracking code (not only for trac, but for all) to support this kind of scenario by getting more information on the command line about your bug tracker (a -force-absolute-path-in-web-integration kind of parameter). I think the default behaviour is justified in other contexts, so we can't just replace it to make it work with your configuration.
I hope this helps.
Indeed, the subversion repository is checked out on our build server with the following standard directory structure:
And Statsvn is effectively running only on the trunk folder.
And Trac has as root the root of the subversion server.
Like you mention, solution a) is not our goal, we want only the stats on the trunk folder.
And solution b) for Trac is not possible, because we want to see also the commits, source browsing in the branches.
So solution c) is effectively a solution for the problem.
You could adapt the bug tracking code to take in account the new parameter, the proposed -force-absolute-path-in-web-integration
parameter, if not present, the current default behavior, if present use this parameter
How about you do solution a) but exclude everything except the trunk folder while running StatSVN (see the -exclude parameter)?
Log in to post a comment.