|
1 #!/usr/bin/perl |
|
2 # Copyright (c) 2009 Symbian Foundation Ltd |
|
3 # This component and the accompanying materials are made available |
|
4 # under the terms of the License "Eclipse Public License v1.0" |
|
5 # which accompanies this distribution, and is available |
|
6 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 # |
|
8 # Initial Contributors: |
|
9 # Symbian Foundation Ltd - initial contribution. |
|
10 # |
|
11 # Contributors: |
|
12 # |
|
13 # Description: |
|
14 # A quick and dirty perl script to take the generated 'changes.txt' from the BOM and wikify the FCL changes. |
|
15 |
|
16 |
|
17 |
|
18 use strict; |
|
19 |
|
20 my $file = shift @ARGV; |
|
21 open(FILE, "<$file") or die "Coudln't open $file\n"; |
|
22 my $fcl = undef; |
|
23 my $changeset = undef; |
|
24 my $user = undef; |
|
25 while(my $line = <FILE>) |
|
26 { |
|
27 if($line =~ m/(\S+)(\/FCL\/\S+)/i) |
|
28 { |
|
29 my $codeline = $1; |
|
30 my $location = $2; |
|
31 my $root; |
|
32 if ($codeline =~ m/oss/i) |
|
33 { |
|
34 $root = "http://developer.symbian.org/oss" |
|
35 } |
|
36 elsif($codeline =~ m/sfl/i) |
|
37 { |
|
38 $root = "https://developer.symbian.org/sfl" |
|
39 } |
|
40 if (defined $fcl) |
|
41 { |
|
42 print "|}\n"; |
|
43 } |
|
44 $fcl = $root.$location; |
|
45 |
|
46 my @bits = split ("\/",$location); |
|
47 my $packagename = pop @bits; |
|
48 $line = <FILE>; #grab next line 'cos it has the write location |
|
49 $line =~ s/\n//; |
|
50 $line =~ s/\///; #just the first one... |
|
51 |
|
52 print "==== ".$packagename." ([".$fcl." ".$line."]) ====\n"; |
|
53 print "{|\n"; |
|
54 } |
|
55 elsif($line =~ m/(\S+)(\/MCL\/\S+)/i) |
|
56 { |
|
57 if (defined $fcl) |
|
58 { |
|
59 print "|}\n"; |
|
60 } |
|
61 undef $fcl; |
|
62 } |
|
63 elsif($line =~ m/^changeset:\s+\S+:(\S+)/) |
|
64 { |
|
65 #changeset: 118:c5817fd289ec |
|
66 $changeset = $1; |
|
67 } |
|
68 elsif($line =~ m/^user:\s+(\S.+)$/) |
|
69 { |
|
70 #changeset: 118:c5817fd289ec |
|
71 $user = $1; |
|
72 } |
|
73 elsif( defined $fcl) |
|
74 { |
|
75 if($line =~ s/^summary:\s+//) |
|
76 { |
|
77 $line =~ s/\n//; |
|
78 my $bugzilla = "http:\/\/developer.symbian.org\/bugs\/show_bug.cgi?id="; |
|
79 $line =~ s/(bug\s*)(\d+)/\[$bugzilla$2 $1$2\]/gi; |
|
80 print "|[".$fcl."rev\/".$changeset." ".$changeset."]\n|".$line."\n|-\n"; |
|
81 # print "|[".$fcl."rev\/".$changeset." ".$changeset."]\n|".$user."\n|".$line."\n|-\n"; |
|
82 } |
|
83 #abort: unknown revision 'PDK_3.0.c'! |
|
84 elsif($line =~ m/^abort:\sunknown\srevision/i) |
|
85 { |
|
86 print "|\'\'\'TODO New FCL - fill in manually!!!\'\'\'\n"; |
|
87 } |
|
88 } |
|
89 } |
|
90 close FILE; |