From: David S G. <Dav...@la...> - 2005-02-22 15:38:37
|
Aaron, It sounds like what you really want is the 'cvs annotate' feature. This cvs command prints out the revision number and last editor for each line of each file in your working CVS directory. If you check out an older revision of a file, you will see the 'history' of that file's lines up to only the version you have checked out. I don't know how statcvs does the line (was curious myself) counting, but `cvs annotate | grep -c "username"` does a good job of counting lines of a file last edited by 'username'. If you add a pipe in there before the grep with a `grep ';'`, you'd probably get a reasonable estimate of lines of actual code. DSG > To: sta...@li... > From: Aaron Zinman <az...@MI...> > Date: Mon, 21 Feb 2005 22:35:58 -0500 > Subject: [Statcvs-users] question on generation > > Hi, I'm currently working on a research project that is a > nice visualization that shows the relationship between code > and communication in open source projects. Now that I have > my visualization built, I need to get real data. I'm new to > dealing with CVS in terms of analysis, and uour project > seemed like it would help a lot. I basically need to know > who owns what lines of code at what point in time. However, > I'm not quite sure how you get the statistics that you do > only from the "cvs log" command. Your generated reports > indicate that you can know that "cyganiak" has 4323 lines of > code, but how are you getting this information? That is, cvs > logs give you > > revision 1.2 > date: 2003/03/25 01:20:13; author: lukasz; state: Exp; > lines: +20 -2 Minor code review tasks. > Added some javadocs > Fixed some unhandled Exceptions > > > So you know that lukasz added 20 lines of code, but you don't > know who's -2 he got rid of, so how could you properly deduct > them from the right other people? > > Any pointers would be appreciated. > > Thanks, > Aaron |