LavaBlast Software Blog

Help your franchise business get to the next level.
spacer

Upcoming StatCVS/StatSVN Release

spacer March 31, 2008 13:40 by spacer JKealey

spacer 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.

Current improvements to both StatSVN and StatCVS

  • StatSVN: Faster diffs.
    • StatSVN now takes advantage of a new Subversion 1.4 feature which allows us to perform one svn diff per revision, instead of one svn diff per revision per file. If you don't have 1.4, the old behavior will continue to work.
    • The Apache project blocked our demo because we were doing too many svn diffs on their servers. Hopefully, this will solve this situation in addition to making everything faster.
    • You can still use the old mechanism by using the -force-legacy-diff command line option, should you encounter any problems with the new feature.
  • Both: Export to XML format.
    • A new -xml option generates XML files instead of the typical HTML reports.
  • Both: Now showing affected file count in a commit.
  • StatSVN: The revision number shows up on the commit page.
  • StatSVN: Added support for -tags-dir as a way to specify 'top' directory where the tags are stored, defaulted to "/tags/".
  • StatSVN: Added support for a -anonymize command line option, to anonymize committer names
  • ... and a few minor things.

 

*** Download the alpha version ***

We're looking for some outside help

Instead of releasing v0.4.0 prematurely, we'd like to ask you to help us out!

1) Beta testers and benchmarkers

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).

2) Minor bug fixing & improvements

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.

3) Cool enhancements / external projects.

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.

spacer

4) Up for a challenge?

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.

 

A few links

  • StatSVN
    • Wiki (User Manual)
    • SourceForge
    • Demos
    • StatSVN on StatSVN
    • Download v0.3.1
  • StatCVS
    • User Manual
    • SourceForge
    • StatCVS on StatCVS
    • Download v0.3

 

Conclusion

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. 

spacer
593bb138-4b5f-4716-ad4a-c2067d4d0568|0|.0

Tags: statsvn, subversion, statcvs, cvs, source control, statistics
Categories: Software
Actions: E-mail | Kick it! | Permalink | spacer Comments (40) | spacer Comment RSS

Comments

March 31. 2008 18:07

spacer

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 spacer

April 1. 2008 11:31

spacer

Pingback from mhinze.com

Links Today (2008-04-01)

mhinze.com

April 1. 2008 11:56

spacer

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... spacer

Eric Kemp spacer

April 1. 2008 13:40

spacer

Hi All/Eric,

Excellent idea: I've just implemented that auto-link for check-in comments... I will release it tonight!

Benoit

Benoit spacer

April 1. 2008 14:24

spacer

Benoit,

Just tried it out the linking feature and it works great. Thanks so much adding it so quickly!

Eric Kemp spacer

April 2. 2008 07:06

spacer

Damn, I wish I hadn't set brown as the default link colour. I think I may change that to blue spacer

Nice to see you guys using the charts spacer

monk.e.boy

monk.e.boy spacer

April 2. 2008 07:07

spacer

ooops: link == line colour

monk.e.boy spacer

April 10. 2008 14:50

spacer

"...have to explicitly create an Integer object from your int to insert it into a collection..."

Java's autoboxing does that.

Mike spacer

April 10. 2008 15:00

spacer

autoboxing is a 1.5 feature. We're still stuck in 2003 for compatibility reasons spacer

Jason Kealey spacer

April 14. 2008 08:55

spacer

Hi,

It would be nice if statsvn had an option to use repository browser from trac instead viewvc.

jfb spacer

April 14. 2008 09:08

spacer

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 spacer

Jason Kealey spacer

April 14. 2008 09:48

spacer

I'll have a look during my spare time. Doing a checkout now ...

jfb spacer

April 14. 2008 09:51

spacer

Excellent. Don't forget to get StatCVS too as that code is shared between both projects.

Extend net.sf.statcvs.output.WebRepositoryIntegration

Jason Kealey spacer

April 14. 2008 12:45

spacer

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 spacer

Aaron Korver spacer

April 14. 2008 13:01

spacer

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 spacer

April 14. 2008 18:31

spacer

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 spacer

April 21. 2008 12:07

spacer

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 spacer

April 21. 2008 12:44

spacer

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 spacer

May 12. 2008 21:43

spacer

The manual wiki page is down at the moment spacer

Justin spacer

May 12. 2008 21:47

spacer

Justin,

sourceforge.net/.../forum.php

Should be back up soon.

Jason Kealey spacer

May 16. 2008 17:58

spacer

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 spacer

May 17. 2008 15:14

spacer

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 spacer

May 28. 2008 15:40

spacer

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 spacer

Theresa spacer

May 28. 2008 16:01

spacer

Excellent! spacer

Jason Kealey spacer

July 30. 2008 15:39

spacer

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 spacer

July 30. 2008 15:45

spacer

One possible reason: blechie.com/wtilton/archive/2007/10/15/309.aspx

Jason Kealey spacer

July 30. 2008 16:12

spacer

I've tried the step that are in the link but I get the same error.

Alejando spacer

August 1. 2008 08:27

spacer

What can I do to resolve my problem?

Alejando spacer

August 1. 2008 09:28

spacer

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 spacer

August 1. 2008 10:17

spacer

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 spacer

August 1. 2008 14:30

spacer

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 spacer

August 4. 2008 11:47

spacer

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 spacer

August 4. 2008 11:51

spacer

I'm happy you like the software spacer

Jason Kealey spacer

February 22. 2010 05:13

spacer

<a class="temex-az.com" title="Online trading guide">Online trading guide</a>

rnaky spacer

February 23. 2010 05:19

spacer

I like using the tools that you can find at www.registry-cleaners-compared.com

Greg spacer

February 23. 2010 05:19

spacer

You might also like this software: www.2010registrycleaners.com

Tom spacer

February 24. 2010 08:09

spacer

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 spacer

May 20. 2010 13:40

spacer

Pingback from 327.computeronlinebingo.com

Sale 1967 1965 Dodge Coronet 500, Parts New 1953 Dodge Coronet

327.computeronlinebingo.com

November 11. 2010 22:21

spacer

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 spacer

May 3. 2011 08:34

spacer

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

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.