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: Ted Stern
Subject: Re: findin sloc changes between two tags
Date: Mon, 18 Feb 2008 09:28:58 -0800
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

On 16 Feb 2008 03:02:55 -0800, yeti wrote:
>
> Hi,
>
> I want to find the SLOC that changed between two versions of a file.
> For this I'm using cvs diff.
> But the problem is that diff shows even those differences which are
> actually comments. I want to ignore comments ("C and C++" style
> comments).
>
> Are there any commands/scripts which I can use ??
>
> regards
>
> Rohin
>

Hello Rohin,

GNU diff has the option -I RE (i.e., ignore regular expression), but I don't
know if your version of cvs diff will pass through your option.

You might have to resort to

   cvs update -r <version1> -p filename > filename~<version1>~
   cvs update -r <version2> -p filename > filename~<version2>~

   diff -I '^ *//' filename~{<version1>,<version2>}~

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?).

Ted
-- 
 dodecatheon at gmail dot com
 Frango ut patefaciam -- I break so that I may reveal




reply via email to

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