StatSVN is a fine tool for Subversion history statistics —15 January 2012
StatSVN is easy to use and free, and can reveal interesting statistics about the commit history of a Subversion repository.
One gotcha I had with it though is that occasionally it can have totally misleading error messages like this one:
svn log: svn info: XML document structures must start and end within the same entity.
The tool works with an XML file generated by “svn log -v –xml” and a svn checkout directory. Although this error message clearly suggests a broken XML file, it was nonsense in all the cases I’ve seen, and the real cause was problems with the svn checkout directory, for example because of files with “!” or “~” status. After I cleaned up the svn checkout directory, statsvn worked nicely.
Another tool for the same purpose that can be interesting is svnplot (a completely different tool, nothing to do with statsvn).
Update
A few people asked what is the meaning of “svn status” showing files with “!” and “~” and how to clean them up. These are problems in your own working directory, most likely because you are using subversion incorrectly. Files marked with “!” are usually files that were deleted not with “svn rm”. A “svn update” can bring them back.
Directories marked with “~” usually happen if the “.svn” directory disappeared from that directory. One typical example is when people incorrectly add build output folders to their repository, and when they build the project the output folder is recreated, inevitably without the “.svn” control directories. The best solution is to remove the build products from the repository and do a clean checkout.
In general, the strange errors with svnstat mentioned in the post should not happen if you run statsvn right after a “svn checkout”.