3 my ( $tag, $filename, $date );
4 my ( $tmp, $change_flag );
8 print "Usage: ", $0, " cvstag date file\n";
16 print STDERR "$filename\n";
18 open ( CVSLOG, "cvs log -d\"$date\" $filename |" ) || die $!;
21 ## First get the branch revision number
24 while ( !defined($revision) ) {
25 if ( eof( \*CVSLOG ) ) {
26 print STDERR "Premature end of cvs log output!\n";
33 if ( $string =~ /$tag:/ ) {
34 ( $tmp, $revision ) = split( /:/, $string );
35 $revision =~ s/\s+//g;
36 $revision =~ s/\.0\./\./g;
41 ## Setup the beginning of the first record
44 while ( $string !~ /^-+/ ) {
46 exit(0) if ( eof(\*CVSLOG) );
50 ## Loop starting at the revision number for the entry
53 while ( $string = <CVSLOG> ) {
55 ($tmp, $entry_rev) = split( /\s+/, $string );
56 if ( equal_revision( $revision, $entry_rev ) ) {
57 if ( ! defined($change_flag) ) {
58 print "++++++++++++++++++++++++++++++++++++++++++++++++++\n";
59 print "## $filename\n";
64 while ( $string !~ /^-+/ && !eof(CVSLOG) ) {
70 while ( ($string !~ /^-+/) && !eof(CVSLOG) ) {
79 ##############################################################
82 my ( $branch, $newfile ) = @_;
84 my ( @branch_rev, @file_rev );
86 @branch_rev = split( /\./, $branch );
87 @file_rev = split( /\./, $newfile );
89 return 0 if ( $#branch_rev != ($#file_rev - 1) );
92 while( $indx <= $#branch_rev ) {
93 if ( $branch_rev[$indx] != $file_rev[$indx] ) {