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

Re: LOC Metrics?/

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Sun, 24 May 2009 10:32:00 -0500

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_at_subversion.tigris.org].
Received on 2009-05-24 17:33:05 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.