#!/usr/bin/perl #use Data::Dumper; $baseoss = "http://oss.sgi.com/cgi-bin/cvsweb.cgi"; $v24 = "/linux-2.4-xfs"; $v25 = "/linux-2.5-xfs"; $lver = $v24; while(<>){ next if /^http:/; print $_; if ($_ =~ "2.4.x-xfs"){ $lver = $v24; } elsif ($_ =~ "2.5.x-xfs"){ $lver = $v25; } if ((($file,$revB,$revM) = /(.+)\ -\ ([0-9]+)\.([0-9]+)/)){ $revP = $revM - 1; # print "$file $revB $revM $revP\n"; $url1 = "r1=text&tr1=$revB.$revM&"; $url2 = "r2=text&tr2=$revB.$revP&"; # $fullurl = $base."/".$file.".diff?".$url1.$url2."f=h"; # print "$fullurl\n"; if ($revM == 1){ $fullurl2 = $baseoss.$lver."/".$file; } else { $fullurl2 = $baseoss.$lver."/".$file.".diff?".$url1.$url2."f=h"; } print "$fullurl2\n"; } }