bldsystemtools/commonbldutils/GenerateChangesReport.pl
branchRCL_3
changeset 2 99082257a271
parent 0 83f4b4db085c
equal deleted inserted replaced
1:d4b442d23379 2:99082257a271
       
     1 #
       
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description: 
       
    15 #
     1 #! perl
    16 #! perl
     2 
    17 
     3 use strict;
    18 use strict;
     4 use Getopt::Long;
    19 use Getopt::Long;
     5 
    20 
   538 <h2><center><font color = "blue">GT Components</font></center></h2>\n
   553 <h2><center><font color = "blue">GT Components</font></center></h2>\n
   539 HEADING_EOF
   554 HEADING_EOF
   540     
   555     
   541     my $CompName;
   556     my $CompName;
   542     my $dirCount = 0;
   557     my $dirCount = 0;
       
   558 	my $spacer = "\n";
   543 
   559 
   544 
   560 
   545     # Loop through the list of elements running perforce commands to obtain the descriptions
   561     # Loop through the list of elements running perforce commands to obtain the descriptions
   546     # of any changes that have been made since the last release build
   562     # of any changes that have been made since the last release build
   547     foreach my $element(@ComponentAndSource)
   563     foreach my $element(@ComponentAndSource)
   671             	}
   687             	}
   672             	
   688             	
   673             	# Must be properly formatted change description
   689             	# Must be properly formatted change description
   674             	# discard everything seen so far except the "Change" line.
   690             	# discard everything seen so far except the "Change" line.
   675             	@revisedLines = (shift @revisedLines);
   691             	@revisedLines = (shift @revisedLines);
   676             	while ($line = shift @changeLines)
   692                 
       
   693 		# Process all lines starting with the first <EXTERNAL> section.
       
   694             	while (($line =~ /<EXTERNAL>$/) || ($line = shift @changeLines))
   677             	{
   695             	{
   678             		last if ($line =~ /<\/EXTERNAL>$/);
   696 		    # Process an <EXTERNAL> section.
       
   697 		    while ($line =~ /<EXTERNAL>$/) 
       
   698 		    {
       
   699 			# Keep processing until an </EXTERNAL> line is encountered
       
   700             		while(($line = shift @changeLines) && ($line !~ /<\/EXTERNAL>$/))
       
   701 			{
       
   702 			    $line =~ s/^\t+//;
       
   703 			    $line =~ s/\&/&amp;/g; 
       
   704 			    $line =~ s/\</&lt;/g; 
       
   705 			    $line =~ s/\>/&gt;/g; 
       
   706 			    $line =~ s/\"/&quot;/g;	# quote the " character as well
       
   707 
       
   708 			    push @revisedLines, $line;
   679             		
   709             		
   680             		$line =~ s/^\t+//;
   710 			    # Opportunity to pick information out of changes as they go past
   681 					$line =~ s/\&/&amp;/g; 
   711 			    if ($line =~ /^\s*((DEF|PDEF|INC)\d+):?\s/)
   682 					$line =~ s/\</&lt;/g; 
   712 				{
   683 					$line =~ s/\>/&gt;/g; 
   713 				$allDefects{$1} = $line;
   684 					$line =~ s/\"/&quot;/g;	# quote the " character as well
   714 				next;
   685 
   715 				}
   686             		push @revisedLines, $line;
   716 			    if ($line =~ /^(BR[0-9.]+)\s/)
   687             		
   717 				{
   688             		# Opportunity to pick information out of changes as they go past
   718 				$allBreaks{$1} = $line;
   689 					if ($line =~ /^\s*((DEF|PDEF|INC)\d+):?\s/)
   719 				next;
   690 					{
   720 				}
   691 						$allDefects{$1} = $line;
   721 			}
   692 						next;
   722 			push @revisedLines, $spacer;
   693 					}
   723 		    }
   694 					if ($line =~ /^(BR[0-9.]+)\s/)
       
   695 					{
       
   696 						$allBreaks{$1} = $line;
       
   697 						next;
       
   698 					}
       
   699 
       
   700             	}
   724             	}
   701             	
   725             	
   702               	# update the description for this change
   726               	# update the description for this change
   703               	@{$changeToDescription{$change}} = @revisedLines;
   727               	@{$changeToDescription{$change}} = @revisedLines;
   704             	printf ".. formatted change %d - %d external lines\n", $change, scalar @revisedLines if ($debug);
   728             	printf ".. formatted change %d - %d external lines\n", $change, scalar @revisedLines if ($debug);