Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: svn metric extractor

by jmcnamara (Monsignor)
on Jan 28, 2010 at 15:34 UTC ( #820174=note: print w/ replies, xml ) Need Help??

in reply to svn metric extractor

That is useful.

I often generate metrics using 'svn diff' combined with diffstat* which produces a nice ascii bar chart to indicate the amount of change.

* This is often available on Linux systems but you may need to compile the latest to display modified lines as well as added/deleted. The output looks something like this:

foo/bar/procs/update.sql | 14 + foo/include/ltime.h | 23 ++ foo/bar/pp_cfg.c | 18 + foo/bar/newdata.c | 189 ++++++++!! foo/bar/newdata.h | 25 + foo/bar/parser.c | 8 - ... 16 files changed, 661 insertions(+), 96 deletions(-), 76 modificatio +ns(!)


Comment on Re: svn metric extractor
Download Code
Replies are listed 'Best First'.
Re^2: svn metric extractor
by Anonymous Monk on Oct 17, 2012 at 15:28 UTC

    Hi!! Exactly what command you use to generate this output? with Subversion. Thanks for all

Re^2: svn metric extractor
by Anonymous Monk on Oct 09, 2012 at 09:16 UTC

    John, it's possible to share the commands that you use to find add, modified and deleted lines between two revisions? Thank's for all

      Using diffstat with the -m option gives the modified lines (as well as the added and deleted):

      diff dir1 dir2 | diffstat -m

      I didn't need to modify it in any way. However, at the time of the original post I had to build the code from the website to get a version with the -m option. I think more recent OSes will come with that version by default or at least provide a package.


      Thank's for all John. It's possible to obtain # Lines Added # Lines Modified # Lines Churned (Added + Modified) # Lines Deleted separatly between two revisions? I need to obtain lines added, lines modified, lines deleted with shell commands between two subversion revision. It's possible?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://820174]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2015-11-30 21:02 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (783 votes), past polls