# HG changeset patch # User MattD # Date 1260965327 0 # Node ID be0078a0f686c8c38175701ef6033f99b24b862b # Parent 3f94900ba43e30b76dd5fa25cbbdd8362ada70ea# Parent d851824a103989c015c6210cef895fb9e3d88c1f Catchup Merge diff -r 3f94900ba43e -r be0078a0f686 releaseAutomation/wikify_bom_fcl_changes.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/releaseAutomation/wikify_bom_fcl_changes.pl Wed Dec 16 12:08:47 2009 +0000 @@ -0,0 +1,90 @@ +#!/usr/bin/perl +# Copyright (c) 2009 Symbian Foundation Ltd +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Symbian Foundation Ltd - initial contribution. +# +# Contributors: +# +# Description: +# A quick and dirty perl script to take the generated 'changes.txt' from the BOM and wikify the FCL changes. + + + +use strict; + +my $file = shift @ARGV; +open(FILE, "<$file") or die "Coudln't open $file\n"; +my $fcl = undef; +my $changeset = undef; +my $user = undef; +while(my $line = ) +{ + if($line =~ m/(\S+)(\/FCL\/\S+)/i) + { + my $codeline = $1; + my $location = $2; + my $root; + if ($codeline =~ m/oss/i) + { + $root = "http://developer.symbian.org/oss" + } + elsif($codeline =~ m/sfl/i) + { + $root = "https://developer.symbian.org/sfl" + } + if (defined $fcl) + { + print "|}\n"; + } + $fcl = $root.$location; + + my @bits = split ("\/",$location); + my $packagename = pop @bits; + $line = ; #grab next line 'cos it has the write location + $line =~ s/\n//; + $line =~ s/\///; #just the first one... + + print "==== ".$packagename." ([".$fcl." ".$line."]) ====\n"; + print "{|\n"; + } + elsif($line =~ m/(\S+)(\/MCL\/\S+)/i) + { + if (defined $fcl) + { + print "|}\n"; + } + undef $fcl; + } + elsif($line =~ m/^changeset:\s+\S+:(\S+)/) + { + #changeset: 118:c5817fd289ec + $changeset = $1; + } + elsif($line =~ m/^user:\s+(\S.+)$/) + { + #changeset: 118:c5817fd289ec + $user = $1; + } + elsif( defined $fcl) + { + if($line =~ s/^summary:\s+//) + { + $line =~ s/\n//; + my $bugzilla = "http:\/\/developer.symbian.org\/bugs\/show_bug.cgi?id="; + $line =~ s/(bug\s*)(\d+)/\[$bugzilla$2 $1$2\]/gi; + print "|[".$fcl."rev\/".$changeset." ".$changeset."]\n|".$line."\n|-\n"; +# print "|[".$fcl."rev\/".$changeset." ".$changeset."]\n|".$user."\n|".$line."\n|-\n"; + } + #abort: unknown revision 'PDK_3.0.c'! + elsif($line =~ m/^abort:\sunknown\srevision/i) + { + print "|\'\'\'TODO New FCL - fill in manually!!!\'\'\'\n"; + } + } +} +close FILE; \ No newline at end of file