info-cvs
[Top][All Lists]
Advanced

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

Re: Search for a specific word in all the repository


From: Gary Funck
Subject: Re: Search for a specific word in all the repository
Date: Thu, 14 Feb 2008 17:10:54 -0800
User-agent: Mutt/1.5.17 (2007-11-01)

On 02/14/08 16:11:51, Jack wrote:
> Hi,
> i would like to know WHEN a specific "word" appeared for the first time
> in any of the files on the CVS.
>
> If i can't do that, is it possible to know WHEN the word appeared for the
> first time in any commit comments ?
>
> How can i do that, plz ?

The brute force method is to checkout the sources for each
day, and keep going until a match is found.

Attahced is a Perl script that implements this approach.
It usses a binary search.  Note that it works on days only
so if there is more than one checkin for a given day,
it will match on the latest in that day.  This approach could be
extended to binary search within the day and find the
actual version of interest but that's more work.

To use the script, first change the $repository variable
to deisgnate the repository of interest.  Change $date1
to be the low end of the date range of interest, if you
need to.  Invoke the script as follows:
  cvs_find_match word
where 'word' is that string that will be matched.

The script checks the repository out into a directory
named 't-src' in the current directory.  The last
revision checked out will be the first that matched
(to daily resolution).

Note: this script is only lightly tested.  If have
any fixes/enhancements, please send them my way.

  - Gary

Attachment: cvs_find_first
Description: Text document


reply via email to

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