[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn Line Count metrics, counting line changes

From: Fred Trotter <fred.trotter_at_gmail.com>
Date: 2006-03-27 19:17:16 CEST

         My googling the subject has turned up many requests for this type
of script, but no solutions. I am interested in performing an analysis on
the number of lines of code that are modified in a svn repository over time.
To do this I simply need a way to see how many lines of code are in each
revision number. I would like to have a simple csv, (or xml) file that
states at least. Something like this.

Rev, LOC added/changed
1, 200
2, 10
3, 40
n, 100

It would be great if I could get something like
Rev, file, lines added/changed
1, my_phpfile.php, 20
1, my_java_file.java, 2
1, my_other_file, 10

or something like that. I have searched for this and only discovered
questions like...

There are dicussions in the past on this list which talk about there being
no easy way to do this, or using multiple calls to svn diff to get the
answer. Perhaps multiple calls to svn diff using a special diff syntax
piped to wc?

If no one has a solution to this problem then I intend to create one. So any
advice to that end is helpful. I recognize, from previous posts, that svn
internals are not designed to provide this, so I am not looking to create a
"real time" tool. I will be satisfied with a "runs all night but gets the
right answer" type script.

Please advise,

Fred Trotter
SynSeer, Consultant
Received on Mon Mar 27 19:18:18 2006

This is an archived mail posted to the Subversion Users mailing list.