Jan 14, 2008

Is StatSVN dead?

When SVN user looks for a descent SVN statistics tool, StatSVN will definitely come up in the search.
Two years ago I have also looked for a free SVN statistic tools and StatSVN was my choice. In this post I will shortly describe my experience with the tool.
First of all, StatSVN is easy in use tool written in Java, and it has extremely simple installation :)
BTW, I am using StatSVN v.0.3.1.

Requirements
  • Java v.1.4.x. (I recommend to use Sun's Java machine, I had some problems with machines from other vendors).
  • The SVN command-line client v.13.0 or higher.
Installation and Usage
Here you can read a detailed installation and usage instruction.

Experience

#1 Multiple projects and tags

In my project I have one SVN repository for several projects. I have something like the following:

  • SVN repository
    • Project #1
      • branches
      • tags
      • trunk
    • Project #2
      • branches
      • tags
      • trunk
I wanted to have tags of the projects to be recognized and published in reports. Unfortunately StatSVN determins tags by looking at your repository's /tags directory. To be able to use this feature, you must generate a log file from the root of your repository, so that the log contains information from both the /tags and the /trunk. The checked out version does not have to contain the tags directory. With my svn layout this feature didn't work, of course.
What I did to fix it, I've just hacked a bit the svn log output file (before giving it to StatSVN) by processing it with the following command:

sed -i "s/\/$PROJECT_NAME\/tags\//\/tags\//g" svn.log

It worked for me, since I am generating statistics for each project independently.
Newer version of StatSVN, which hasn't been yet released, supports "-tags-dir" options. This option allows to use another top-level directory than 'tags'. This actually should be a solution to multiple projects in one SVN repository, like I have, or to custom SVN layouts.

#2 Broken Font
At the very beginning I had an issue with StatSVN - font of the charts' labels was broken, "mirrored" and was difficult to read.
I think it had something to do with the version of Java runtime environment I've been using at that time, since StatSVN uses JFreeChart to generate charts. I believe I was using something from GNU or maybe IcedTea, I don't already remember it. Anyway, after I get Sun JRE installed, my problems with the font disappeared.

#3 Source code statistics
I think, the functionality StatSVN still misses is a kind of integration with SLOCCount or something. I therefore use an external call for SLOCCount in order to get a better LOC calculation. Because SLOC from StatSVN is not really what I need.
By the way there is a nice comment of Jason Kealey (StatSVN developer) on the subject:
For the moment, we measure physical lines of code; language independant
(similar to wc -l). Whitespace is not ignored. Comments are not ignored.
StatCVS computes the LOC in the same way, but since we're contacting the
repository, we have the possibility to implement other models.

My personal opinion is that LOC should not be the basis of any profound
analysis. We have the simplest form of LOC implemented in StatSVN that's
enough to give you an overview of what's happening. Regardless of the
method, if the method is known, developers can cheat the metric. Yes, the
metrics are artificially inflated by whitespace and comments, but hopefully
the inflation is uniform across the codebase.
#4 Integration with Trac
As far as I know there is no integration with Trac possible, and no work is done there, besides this attempt.

#5 Style sheet
The default style sheet of StatSVN isn't really nice. I suggest something like this.

Looking at the name of the topic "Is StatSVN dead?", I would answer "I dunno". The last version of StatSVN was released on 2007-03-10, almost a year ago. One can think that the project is dead. Probably project was suspended for some time, that's may be true. But now one can see some activity on the field. So let's see and hope that we get a new version of StatSVN very soon!

So far that's it. I'll post some more information later :)

5 comments:

Jason Kealey said...

Dead? No. In need of some new contributors? Hell yeah!

Jason Kealey - lead developer

Anar Manafov said...

Jason, thanks for commenting on this one.

By the way, I do really consider StatSVN one of the best SVN statistics tool. Keep it that way.

jason kealey said...

All credit goes to StatCVS.. we only rewrote the input layer!

Anar Manafov said...

I would like to use a chance and ask. When do you plan to make a next release?

Anonymous said...

Is it dead now? :) (it's been over 7 years ...)