SVN Diffstat

Creates git like diff stat over a whole svn repository.

License

License

MIT
Categories

Categories

Subversion Development Tools Version Controls FST Data Data Formats Serialization
GroupId

GroupId

com.github.marschall
ArtifactId

ArtifactId

svn-diffstat
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

SVN Diffstat
Creates git like diff stat over a whole svn repository.
Project URL

Project URL

https://github.com/marschall/svn-diffstat
Source Code Management

Source Code Management

https://github.com/marschall/svn-diffstat

Download svn-diffstat

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.marschall/svn-diffstat/ -->
<dependency>
    <groupId>com.github.marschall</groupId>
    <artifactId>svn-diffstat</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.marschall/svn-diffstat/
implementation 'com.github.marschall:svn-diffstat:1.2.0'
// https://jarcasting.com/artifacts/com.github.marschall/svn-diffstat/
implementation ("com.github.marschall:svn-diffstat:1.2.0")
'com.github.marschall:svn-diffstat:jar:1.2.0'
<dependency org="com.github.marschall" name="svn-diffstat" rev="1.2.0">
  <artifact name="svn-diffstat" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.marschall', module='svn-diffstat', version='1.2.0')
)
libraryDependencies += "com.github.marschall" % "svn-diffstat" % "1.2.0"
[com.github.marschall/svn-diffstat "1.2.0"]

Dependencies

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.hamcrest : hamcrest-all jar 1.3

Project Modules

There are no modules declared in this project.

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.

Versions

Version
1.2.0
1.1.0