You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Tennis Smith <te...@yahoo.com> on 2009/05/24 14:01:16 UTC

LOC Metrics?/

Hi,

What's the best utility to measure the number of lines of code added between
2 dates?

Thanks,
-T

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2353312

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: LOC Metrics?/

Posted by Tennis Smith <te...@yahoo.com>.
Thanks! That's perfect. :)

-T

On Sun, May 24, 2009 at 8:39 AM, B Smith-Mannschott
<bs...@gmail.com>wrote:

> On Sun, May 24, 2009 at 16:01, Tennis Smith <te...@yahoo.com>
> wrote:
> > Hi,
> >
> > What's the best utility to measure the number of lines of code added
> between
> > 2 dates?
> >
> > Thanks,
> > -T
> >
>
> I've been quite happy with piping the output of svn diff through
> [diffstat][1].
>
>    $ svn diff -r'{FROMDATE:TODATE}' URL | diffstat
>
> [1]: http://freshmeat.net/projects/diffstat/
>
> // Ben
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2353338

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: LOC Metrics?/

Posted by "B. Smith-Mannschott" <bs...@gmail.com>.
On Sun, May 24, 2009 at 16:01, Tennis Smith <te...@yahoo.com> wrote:
> Hi,
>
> What's the best utility to measure the number of lines of code added between
> 2 dates?
>
> Thanks,
> -T
>

I've been quite happy with piping the output of svn diff through [diffstat][1].

    $ svn diff -r'{FROMDATE:TODATE}' URL | diffstat

[1]: http://freshmeat.net/projects/diffstat/

// Ben

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2353315

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: LOC Metrics?/

Posted by Dextrous <de...@gmail.com>.
you can take a look at statsvn <http://www.statsvn.org/>and svnplot
<http://code.google.com/p/svnplot/>
I am nit sure if the above functionality is available out of the box but its
easy to extend the stats provided.

On Sun, May 24, 2009 at 7:31 PM, Tennis Smith <te...@yahoo.com>wrote:

> Hi,
>
> What's the best utility to measure the number of lines of code added
> between 2 dates?
>
> Thanks,
> -T
>



-- 
Cheers,
Vishwajeet
http://www.singhvishwajeet.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2353313

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: LOC Metrics?/

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 24, 2009, at 09:01, Tennis Smith wrote:

> What's the best utility to measure the number of lines of code  
> added between 2 dates?

Failing some already-built tool for this, you could use "svn diff - 
r'{DATE1:DATE2}'" to get the diff between the last revision before  
DATE1* and the last revision before DATE2, and then parse it, for  
example looking at the number of lines beginning with "+" (added  
lines) and "-" (deleted lines).

First be sure, however, that you really want to do this; many  
consider affected-lines-of-code counts to be a pointless metric to  
track. The example I like to give:

http://www.folklore.org/StoryView.py? 
project=Macintosh&story=Negative_2000_Lines_Of_Code.txt&topic=Management 
&sortOrder=Sort%20by%20Date

It can perhaps be useful as a very general indicator of where things  
are happening in a project.


*Note that this will include the changes for one additional revision  
that you did not want, at the beginning of the range. See the box "Is  
Subversion a Day Early?" on this page:

http://svnbook.red-bean.com/en/1.5/ 
svn.tour.revs.specifiers.html#svn.tour.revs.dates

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2353314

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].