Sorry - this page got lost somewhere along the way.
I've pulled up the text from the Wayback Machine. I will dig through my archives and see if I can find the associated screenshots.
StatSvn Manual: http://wiki.statsvn.org/User%20Manual.ashx
StatSVN retrieves information from a Subversion repository and generates various tables and charts describing the project development, e.g. timeline for the lines of code, contribution of each developer etc. The current version of StatSVN generates a static suite of HTML or XDOC documents containing tables and chart images.
Note: In this tutorial I'm using CFEclipse.
They have a ZIP file you can download which contains a readme.txt and statsvn.jar. Copy the statsvn.jar to your Eclipse Ant plugin directory: C:\eclipse-3.2\plugins\org.apache.ant_1.6.5\lib\
You then need to tell Ant about the new file.
Next you need to add the following lines to your build.xml so Ant can find the tasks:
<taskdef name="statsvn" classname="net.sf.statsvn.ant.StatSvnTask" />
I placed this right after my project declaration and before my description.
Now in order to run StatSVN you need a SVN log from your project - we'll automate this as well:
<!-- this will generate a SVN log file from the working copy --> <target name="buildLog"> <!-- create a log file for the statsvn to use --> <exec executable = "svn" output = "d:/temp/svn.log"> <arg line = "log D:/wwwroot/myproject --xml -v"/> </exec> <echo message="SVN log created successfully!"/> </target>
Adjust the paths above accordingly - I'm assuming you'll have a /temp directory to dump this in…
Next lets make the target for the actual report:
<!-- this will use the statsvn plugin to generate a report and copy it to the developement server --> <target name="buildReport" depends="buildLog"> <statsvn path="D:/wwwroot/myproject" log="d:/temp/svn.log" outputDir="d:/temp/report/stats" title="Subversion Report"/> <echo message="StatSVN report created successfully!"/> </target>
Notice the depends=“buildLog” in the target - this will automatically run the 'buildLog' target when you run the report. Read more about depend at the Ant site.
Now simply run the 'buildReport' target!
Image:Run-ant.gif
Image:log-output.gif
To clean this up - I'll probably add some tasks to automatically create the /temp directory, as well as clean up any previous reports - maybe ZIP them up for archives?
It would also be easy to copy these reports somewhere on your server so others could easily view them.
Below are a few examples of the reports StatSVN produces.
Image:reports.gif