webengine/osswebengine/WebKitTools/S60Tools/svn-update.bat
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 @rem = '--*-Perl-*--
       
     2 @echo off
       
     3 perl -x -S %0 %*
       
     4 if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
       
     5 if %errorlevel% == 9009 echo You do not have Perl in your PATH.
       
     6 if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
       
     7 goto endofperl
       
     8 @rem ';
       
     9 #!/usr/bin/perl -w
       
    10 
       
    11 use strict;
       
    12 
       
    13 my $tot_version_file = '.\WebKit\s60\tot_version.txt';
       
    14 my $headfilename = 'head.txt';
       
    15 my $head_r = 'HEAD';
       
    16 
       
    17 print "Getting svn HEAD info off http://svn.webkit.org/repository/webkit/branches/Safari-3-branch\n";
       
    18 system "svn info -r HEAD http://svn.webkit.org/repository/webkit/branches/Safari-3-branch > $headfilename";
       
    19 open( FILE, "+< $headfilename" ) or die "Can't open $headfilename : $!";
       
    20 my @svn = <FILE>;
       
    21 
       
    22 foreach my $line (@svn) {
       
    23         if($line =~ m/Revision: (.*?)\n/) {
       
    24                 $head_r = $1;
       
    25                 last;
       
    26         }
       
    27 }
       
    28 
       
    29 
       
    30 close (FILE);
       
    31 unlink($headfilename) or warn "cannot delete $headfilename";
       
    32 
       
    33 open( FILE, "< $tot_version_file" ) or die "Can't open $tot_version_file : $!";
       
    34 my @data = <FILE>;
       
    35 
       
    36 foreach my $line (@data) {
       
    37         chomp $line;
       
    38         print "Start diffing $line:$head_r\n";
       
    39         system "svn diff -r $line:$head_r http://svn.webkit.org/repository/webkit/branches/Safari-3-branch >> webkit$head_r.txt";
       
    40 }
       
    41 close (FILE);
       
    42 print "diff is in webkit$head_r.txt\n";
       
    43 print "modify it as you wish...and press Enter to continue.\n";
       
    44 <STDIN>;
       
    45 print "Start applying webkit$head_r.txt to .\n\n\n";
       
    46 system ".\\WebkitTools\\S60Tools\\svn-apply webkit$head_r.txt";
       
    47 print "\n\n\nUpdate $tot_version_file with $head_r, please!\n";
       
    48 
       
    49 __END__
       
    50 :endofperl