#!/bin/csh
#
# A script to help you search a file for when something was removed or added

set search_string = $1
set search_file = $2

if ( ! -e $search_file ) then
   echo "Cannot find '$search_file'. Aborting"
   exit 1
endif

@ xmax = `cvs log $search_file | grep '^head:' | sed -e 's/head: 1.//'`
@ x = 1

while ( $x < $xmax ) 
   cvs up -r 1.$x >& /dev/null
   echo -n "$search_file 1.$x :"
   grep "$search_string" $search_file >& /dev/null
   if ( $status ) then
      echo "-  no"
   else
      echo "+  yes"
   endif

   @ x = $x + 1
end
