All Projects → marschall → svn-diffstat

marschall / svn-diffstat

Licence: MIT license
creates a code frequency chart for SVN

Programming Languages

java
68154 projects - #9 most used programming language

SVN DIFFSTAT Build Status

Creates git like diff stat over a whole svn repository. Only one author and a certain set of files are considered. In addition a chart similar to Code Frequency is created.

This is very raw and not polished software. These are the steps that you need to do to run the software

  • build the software with mvn clean package
  • check out the part of the subversion repository you're interested in
  • run the software in the folder of the working copy you just checked out

Command Line Options

The following command line options are supported:

-author -a
Required. The authors that should be analyzed.
-file -f
Required. The file where to save the generated chart. Will always be a PNG.
-extension -e
Optional. The file extensions that should be analyzed.
-width -w
Optional. The width of the chart in pixels. Defaults to 1200.
-height -h
Optional. The height of the chart in pixels. Defaults to 600.
-double -d -retina -r
Optional. Render in double the resolution, useful for retina Macs. Defaults to false.
-max -m
Optional. Commits with more than this number of lines changed will be ignored. Defaults to 10000.
-protocol -p
Optional. Only initialize support for the given protocol. Options: file, dav, svn.

For example

java -Djava.awt.headless=true -jar svn-diffstat/target/svn-diffstat-1.0.0-SNAPSHOT.jar -d -a marschall -e java -f /Users/marschall/tmp/diffstat.png

Sample

This is a sample chart generated from an actual code base.

sample chart

FAQ

I'm getting NonWritableChannelException on file:// checkouts

Exception in thread "main" java.nio.channels.NonWritableChannelException
        at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1014)

Just try again, somebody committed during the analysis.

Does it scale?

I ran it on a subversion repository with about 240k revisions and it takes about 20 minutes.

Is it any good?

Yes

What's the latest SVN version it supports?

1.8

What Java version does it require?

1.7

Why does my local build not find svnkit?

You need this in your settings. xml

   <profile>
      <id>tmatesoft</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>

      <repositories>
        <repository>
          <id>tmatesoft-releases</id>
          <url>http://maven.tmatesoft.com/content/repositories/releases/</url>
        </repository>
      </repositories>
    </profile>

Credits

This project wouldn't have been possible without the work of others:

Last but not least I'd like to thank Netcetera for sponsoring the work on this. This was literally a one-weekend-hack as you can see from the commit logs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].