As you know, LavaBlast develops most of its applications using Microsoft technologies but we like to dabble with other technologies. We're behind the open source movement and have worked on a few open source projects, mainly in Java. One of these is StatSVN, a tool that retrieves information from a Subversion repository and generates various tables and charts describing the project development. It's so great even Eric Kemp used it on SubSonic. The tool uses StatCVS internally and I've recently been promoted to the project admin status on SourceForge (along with Benoit Xhenseval of Appendium). StatSVN has not evolved much in the last year, since the release of v0.3.1, but we've recently done a few enhancements.
Instead of releasing v0.4.0 prematurely, we'd like to ask you to help us out!
Before going with a full blown release, we want to ensure that the new StatSVN diff works as intended in various contexts. It works on our repositories, but we'd like you to run it on yours. We want to ensure it works well regardless of the operating system, your language, the type of files in your repository, the number of revisions, etc. Ideally, you'd time the whole thing and let us know how much faster it is. Furthermore, if you're a real zealot, you'd compare the line counts computed by both algorithms to ensure they match. (The counts are cached in a local XML file... very easy to compare the results).
We've basically fixed the issues that annoyed us personally, but there are some that remain in both the StatCVS tracker and the StatSVN tracker. You may also be interested in creating new reports, which you think would interest the community.
StatCVS/StatSVN can now export XML. This enables you to create new applications that use the computed data... why not whip up a cool dynamic web application? As a demo, I've imported the XML in ASP.NET and used the Open Flash Chart control we've blogged about in the past.
Subversion supports move operations and CVS doesn't. While developing StatSVN, we decided we'd treat moves as a delete-add sequence, for simplicity's sake. However, this does generate inaccurate statistics. If you're in for a challenge, you could tackle this StatSVN enhancement. We prototyped something in the past, but it ended up being too slow for production use.
Even though StatSVN/StatCVS are Java-based and most of our readers operate in the .NET space, the application itself is platform independent. Personally, I enjoy loading up a recent version of Eclipse and working in Java once in a while because it helps me observe the best in both worlds. I much prefer coding in C# because of the easier string manipulation and the fact that everything is an object so you don't have to explicitly create an Integer object from your int to insert it into a collection. However, when working in VS.NET, I dearly miss the automatic incremental compilation feature that Eclipse runs when you save a file.
Comments
March 31. 2008 18:07
Well, auto trackback notifications don't seem to work, so I'll use the manual trackback protocol (AKA "comment spam") to notify this post that I've posted a follow-up:
jpdaigle.blogspot.com/.../...tatcvssvn-if-you.html
Someone needed to reply to the comment about boxing int values for inclusion in Java collections...
Jean-Philippe Daigle
April 1. 2008 11:31
Pingback from mhinze.com
Links Today (2008-04-01)
mhinze.com
April 1. 2008 11:56
Congratulations!
I've already upgraded the SubSonic stats and things look great. Very glad to see that the -no-developer flag is working properly now!
Now if only it would automatically hotlink urls in check-in comments...
Eric Kemp
April 1. 2008 13:40
Hi All/Eric,
Excellent idea: I've just implemented that auto-link for check-in comments... I will release it tonight!
Benoit
Benoit
April 1. 2008 14:24
Benoit,
Just tried it out the linking feature and it works great. Thanks so much adding it so quickly!
Eric Kemp
April 2. 2008 07:06
Damn, I wish I hadn't set brown as the default link colour. I think I may change that to blue
Nice to see you guys using the charts
monk.e.boy
monk.e.boy
April 2. 2008 07:07
ooops: link == line colour
monk.e.boy
April 10. 2008 14:50
"...have to explicitly create an Integer object from your int to insert it into a collection..."
Java's autoboxing does that.
Mike
April 10. 2008 15:00
autoboxing is a 1.5 feature. We're still stuck in 2003 for compatibility reasons
Jason Kealey
April 14. 2008 08:55
Hi,
It would be nice if statsvn had an option to use repository browser from trac instead viewvc.
jfb
April 14. 2008 09:08
Hey jfb,
We support a number of repository viewers. Adding a new one is a trivial undertaking (one class) - let us know if you're interested in contributing
Jason Kealey
April 14. 2008 09:48
I'll have a look during my spare time. Doing a checkout now ...
jfb
April 14. 2008 09:51
Excellent. Don't forget to get StatCVS too as that code is shared between both projects.
Extend net.sf.statcvs.output.WebRepositoryIntegration
Jason Kealey
April 14. 2008 12:45
Using the new version seems to work great. Is there a feature to map userIDs to userNames? I can't seem to find that in the wiki, and I'm too lazy to grab the source
Aaron Korver
April 14. 2008 13:01
Hmm. Looks like we forgot to talk about that in the wiki. I've updated it.
svn.statsvn.org/.../User_Manual#Report_Options
-config-file <path to properties file>
Allows one to replace the source control username with more information such as real name, website, email and avatar icon. See www.statsvn.org/statsvn.txt for an example.
Jason Kealey
April 14. 2008 18:31
Hi Jason,
I have some working code to comit for trac integration. Please contact me by mail. (it was a pain in the a** for me to make everything work in eclipse, since I'm a visual studio developper ... but it made me discover this wonderfull ide)
jfb
April 21. 2008 12:07
Hey,
statsvn is a nice tool. It would also be nice to have some sort of an offline-mode, where one can analyze an existing xml log file, without actually having to connect to the subversion repository. I know there isn't much info besides username, timestamp and message in the XML output of "svn log --xml". (Perhaps the verbose output includes more info?)
regards
mike
Mike
April 21. 2008 12:44
Hey Mike,
We have had this request in the path. Our SourceForge bug-tracker actually lists both:
- all offline (no server required)
- all online (no working copy required)
Thanks,
Jason
Jason Kealey
May 12. 2008 21:43
The manual wiki page is down at the moment
Justin
May 12. 2008 21:47
Justin,
sourceforge.net/.../forum.php
Should be back up soon.
Jason Kealey
May 16. 2008 17:58
I've tried this on a Mac and on Solaris 10 x86. I keep getting this error:
java -jar ~/statsvn.jar /export/home/svnadm/trunk/svn.log /export/home/svnadm/trunk
May 16, 2008 2:38:09 PM net.sf.statsvn.util.JavaUtilTaskLogger info
INFO: StatSVN - SVN statistics generation
Parsing SVN log '/export/home/svnadm/trunk/svn.log' exclude pattern 'null'
Logfile parsing failed.
svn log: Invalid byte 2 of 2-byte UTF-8 sequence.
Any help would be much appreciated.
David McCutcheon
May 17. 2008 15:14
We had someone else run into a similar issue a while back. I wrote a quick script to find&replace the non UTF-8 characters in the input log file (which I've unfortunately lost with my most recent re-install). You might be able to achieve the same results by changing the encoding type in the XML file.
Feel free to email a compressed version of your log file on the statsvn-developers mailing list on sourceforge.
Thanks and good luck!
Jason Kealey
May 28. 2008 15:40
Jason, your trick worked. I had the same problem as Dave above:
[ttrauger@lmforgeprod dynamicdataserv]$ java -jar /var/www/statsvn/statsvn.jar /var/www/statsvn/svnroot_workingcopies/dynamicdataserv/statsvn.log /var/www/statsvn/svnroot_workingcopies/dynamicdataserv
May 28, 2008 10:32:58 AM net.sf.statsvn.util.JavaUtilTaskLogger info
INFO: StatSVN - SVN statistics generation
Parsing SVN log '/var/www/statsvn/svnroot_workingcopies/dynamicdataserv/statsvn.log' exclude pattern 'null'
Logfile parsing failed.
svn log: Invalid byte 1 of 1-byte UTF-8 sequence.
Now I changed my statsvn.log file to have the following first line: <?xml version="1.0" encoding="ISO-8859-1"?>
Then the java command worked
Theresa
May 28. 2008 16:01
Excellent!
Jason Kealey
July 30. 2008 15:39
Why I get this error?
Parsing SVN log './svn.log' exclude pattern 'null'
Logfile parsing failed.
svn log: svn info: XML document structures must start and end within the same entity.
Alejando
July 30. 2008 15:45
One possible reason: blechie.com/wtilton/archive/2007/10/15/309.aspx
Jason Kealey
July 30. 2008 16:12
I've tried the step that are in the link but I get the same error.
Alejando
August 1. 2008 08:27
What can I do to resolve my problem?
Alejando
August 1. 2008 09:28
Post to the StatSVN mailling lists or forums and we'll help you from there!
(You will need to run with the -debug and the -dump options)
The issue is the svn info --xml . doesn't return valid XML. My guess is that you have something incorrectly configured on your system (SVN, Java XML parser, command line language).
Thanks,
Jason
Jason Kealey
August 1. 2008 10:17
Hi guys, me again too. Jason, your trick above that solved my problem for the utf-8 was great, only the log keeps getting overwritten nightly when the cron runs the svn log command again. Bummer, but I'm still happy that I can fix the log and run manually when I want to!
I also have 3 other projects that are having the same problem as Alejando above. I'm going over to the user forum (www.statsvn.org/forum.html) and see if anyone knows what the problem is!
theresa
August 1. 2008 14:30
We've solved this issue on the forum. The error was simply that the trunk was not synchronized with the log file, as discussed on the previously mentionned blog post.
Jason Kealey
August 4. 2008 11:47
I've got to tell you Jason, you are the best! Turns out that my "update working copy" cron wasn't working! And so my working copy was older than the the svn log, therefore it wouldn't work properly. Thanks so much AGAIN!!
T
theresa
August 4. 2008 11:51
I'm happy you like the software
Jason Kealey
February 22. 2010 05:13
<a class="temex-az.com" title="Online trading guide">Online trading guide</a>
rnaky
February 23. 2010 05:19
I like using the tools that you can find at www.registry-cleaners-compared.com
Greg
February 23. 2010 05:19
You might also like this software: www.2010registrycleaners.com
Tom
February 24. 2010 08:09
Excellent ,fabulous post.I really appreciated with that. Don't forget to get StatCVS too as that code is shared between both projects.
Thanks for providing me a nice information ,
www.flexoplex.net/
flexoplex
May 20. 2010 13:40
Pingback from 327.computeronlinebingo.com
Sale 1967 1965 Dodge Coronet 500, Parts New 1953 Dodge Coronet
327.computeronlinebingo.com
November 11. 2010 22:21
Hi,I have some problems:
My operation :
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
My JDK:
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)
My locale:
LANG=zh_CN.GB18030
LC_CTYPE="zh_CN.GB18030"
LC_NUMERIC="zh_CN.GB18030"
LC_TIME="zh_CN.GB18030"
LC_COLLATE="zh_CN.GB18030"
LC_MONETARY="zh_CN.GB18030"
LC_MESSAGES="zh_CN.GB18030"
LC_PAPER="zh_CN.GB18030"
LC_NAME="zh_CN.GB18030"
LC_ADDRESS="zh_CN.GB18030"
LC_TELEPHONE="zh_CN.GB18030"
LC_MEASUREMENT="zh_CN.GB18030"
LC_IDENTIFICATION="zh_CN.GB18030"
LC_ALL=
I am chinese.So my svn have chinese comments.
# svn log --xml -v > svn.log
so use cat or vi show svn.log,some bad codes show:
<msg>闂鍗曪細鏃?
鎻愪氦浜猴細榛勮搲鍒?
鎻愪氦鍘熷洜锛氱増鏈殑xml鏂囦欢锛屽彧淇敼浜哾ailybuild閰嶇疆鏂囦欢涓璴og4j鐨勯厤缃紝娌℃湁澧炲姞commitbuild閰嶇疆鏂囦欢涓殑姝ら」閰嶇疆锛岀幇澧炲姞銆?/msg>
then I use encoding
# cat svn.xml |iconv -f UTF-8 -t gbk >iso
so cat or vi iso is ok.
but
[root@localhost trunk]# java -jar ../../../statsvn-0.7.0/statsvn.jar iso . -output-dir target -anonymize -debug
2010-11-12 11:19:11 net.sf.statsvn.util.JavaUtilTaskLogger info
信息: StatSVN - SVN statistics generation
Parsing SVN log 'iso'No exclude pattern
良好 statsvn.util.JavaUtilTaskLogger log(): starting to parse...
Logfile parsing failed.
svn log: svn info: XML document structures must start and end within the same entity.
[root@localhost trunk]#
can not run...
Can you help me ?Thanks!
happyday
May 3. 2011 08:34
This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality information. Thanks for sharing.
Tipografia