info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: findin sloc changes between two tags


From: yeti
Subject: Re: findin sloc changes between two tags
Date: Mon, 18 Feb 2008 20:40:18 -0800 (PST)
User-agent: G2/1.0

On Feb 19, 4:38 am, Paul Sander <address@hidden> wrote:
> For this particular metric, I usually run the two versions through a  
> beautifier with standard settings, then diff the output of that.
>
> On Feb 18, 2008, at 10:17 AM, Rick Genter wrote:
>
>
>
> >> From: address@hidden
> >> [mailto:address@hidden
> >> On Behalf Of Ted Stern
>
> >> But that regexp handles only C++ comments.  I don't know of a way to
> >> recognize /* ... [text containing newlines] ... */.  Possibly another
> >> diff utility has that options (xxdiff, tkdiff?).
>
> > You could write an awk or perl script to filter the multiline comments
> > out, save the output to a file, then diff those files. I, however,
> > consider comments to be equally (or even more) important to non-
> > comments
> > in source code, and don't understand the use case.- Hide quoted text -
>
> - Show quoted text -

Hi guys,

Thanks for all those answers. I however thought that this would be a
fairly common problem and there might be a standard solution. Keeping
your suggestions in mind I did

cvs diff -wlcbBC20   -r rev1 -r  rev2 my_file.c  | perl -0777 -pe 's{/
\*.*?\*/}{}gs' | diffstat >> FileToHoldInfo.txt

idea is to get enough context lines and then eliminate the comments
from the diff output and finally use diffstat to gather stats. Do you
think this is the correct way ??

regards

Rohin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]