Subversion Repositories DevTools

Rev

Rev 2319 | Rev 2354 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2319 Rev 2321
Line 44... Line 44...
44
our %ScmSuffixes;
44
our %ScmSuffixes;
45
our %ScmAllPackages;
45
our %ScmAllPackages;
46
our %ScmAllBomProjects;
46
our %ScmAllBomProjects;
47
our %ScmSboms;
47
our %ScmSboms;
48
 
48
 
-
 
49
################################################################################
-
 
50
#   Data structure to help create links in all the files
-
 
51
#       BadVcs_$pvid
-
 
52
#       Repo_$repo
-
 
53
#       Package_$name
-
 
54
#
-
 
55
my $currentSection;
-
 
56
my %htmlData = (
-
 
57
    S0 =>  {file => 'PackageConversion.html'                  , title => 'Master Index'                     , tag => '', 'noHeader' => 0 },
-
 
58
    S1 =>  {file => 'PackageConversion_IR.html'               , title => 'Inlcuded Releases'                , tag => '' },
-
 
59
    S2 =>  {file => 'PackageConversion_ER.html'               , title => 'Excluded Releases'                , tag => '' },
-
 
60
    S3 =>  {file => 'PackageConversion_PkgIndex.html'         , title => 'Complete Package Index'           , tag => '' },
-
 
61
    S4 =>  {file => 'PackageConversion_PkgDetails.html'       , title => 'Package Conversion Details'       , tag => 'Package' },
-
 
62
    S5 =>  {file => 'PackageConversion_BadVersions.html'      , title => 'Bad Package Versions'             , tag => 'BadVcs' },
-
 
63
    S6 =>  {file => 'PackageConversion_BadVersionsPrj.html'   , title => 'Bad Package Versions By Project'  , tag => '' },
-
 
64
    S7 =>  {file => 'PackageConversion_MultiplePackages.html' , title => 'MultiplePackages'                 , tag => '' },
-
 
65
    S8 =>  {file => 'PackageConversion_RepoIndex.html'        , title => 'Repository Index'                 , tag => '' },
-
 
66
    S9 =>  {file => 'PackageConversion_RepoMap.html'          , title => 'Repository Mapping'               , tag => 'Repo' },
-
 
67
    SA =>  {file => 'PackageConversion_unMapped.html'         , title => 'Unmapped Packages'                , tag => '' },
-
 
68
    SB =>  {file => 'PackageConversion_SvnPkgs.html'          , title => 'Packages in Subversion'           , tag => '' },
-
 
69
);
49
 
70
 
50
#-------------------------------------------------------------------------------
71
#-------------------------------------------------------------------------------
51
# Function        : Main Entry
72
# Function        : Main Entry
52
#
73
#
53
# Description     :
74
# Description     :
Line 181... Line 202...
181
        }
202
        }
182
    }
203
    }
183
 
204
 
184
    #
205
    #
185
    #   Find youngest package
206
    #   Find youngest package
-
 
207
    #       - Most recently modified
-
 
208
    #       - Not a ripple
-
 
209
    #       - Not created by buildadm (3768)
186
    #
210
    #
187
    if ( (! exists $PackageData{$pkgid}{youngAge} ) || ( $ScmPackages{$_}{Age} < $PackageData{$pkgid}{youngAge} ) )
211
    if ( (! exists $PackageData{$pkgid}{youngAge} ) || ( $ScmPackages{$_}{Age} < $PackageData{$pkgid}{youngAge} ) )
188
    {
212
    {
189
        $PackageData{$pkgid}{youngAge} = $ScmPackages{$_}{Age};
213
        $PackageData{$pkgid}{youngAge} = $ScmPackages{$_}{Age};
190
    }
214
    }
-
 
215
 
191
    if ( (! exists $PackageData{$pkgid}{youngAgeNonRipple} ) || ( $ScmPackages{$_}{Age} < $PackageData{$pkgid}{youngAgeNonRipple} ) )
216
    if ( (! exists $PackageData{$pkgid}{youngAgeNonRipple} ) || ( $ScmPackages{$_}{Age} < $PackageData{$pkgid}{youngAgeNonRipple} ) )
192
    {
217
    {
193
        unless ( $ScmPackages{$_}{isaRipple} )
218
        unless ( $ScmPackages{$_}{isaRipple} )
194
        {
219
        {
195
            $PackageData{$pkgid}{youngAgeNonRipple} = $ScmPackages{$_}{Age};
220
            $PackageData{$pkgid}{youngAgeNonRipple} = $ScmPackages{$_}{Age};
196
        }
221
        }
197
    }
222
    }
198
 
223
 
-
 
224
    if ( (! exists $PackageData{$pkgid}{nonBuildadm} ) || ( $ScmPackages{$_}{Age} < $PackageData{$pkgid}{nonBuildadm} ) )
-
 
225
    {
-
 
226
        unless ( $ScmPackages{$_}{Creator} == '3768' )
-
 
227
        {
-
 
228
            $PackageData{$pkgid}{nonBuildadm} = $ScmPackages{$_}{Age};
-
 
229
        }
-
 
230
    }
-
 
231
    
-
 
232
 
199
    $PackageData{$pkgid}{name} = $ScmPackages{$_}{name} ;
233
    $PackageData{$pkgid}{name} = $ScmPackages{$_}{name} ;
200
 
234
 
201
    #
235
    #
202
    #   Accumulate Release data
236
    #   Accumulate Release data
203
    #
237
    #
Line 382... Line 416...
382
        "ScmRepoMap", \%Data );
416
        "ScmRepoMap", \%Data );
383
 
417
 
384
    $fh->Close();
418
    $fh->Close();
385
}
419
}
386
 
420
 
387
 
-
 
388
#-------------------------------------------------------------------------------
421
#-------------------------------------------------------------------------------
389
# Function        : generateHTML
422
# Function        : generateHTMLHeader
390
#
423
#
391
# Description     : 
-
 
392
#                   Create per package data
424
# Description     : Create an HTML Header
393
#                   Create a nice HTML file so that it can be hyperlinked
-
 
394
#
425
#
395
# Inputs          : 
426
# Inputs          : $section        - Section tag
396
#
427
#
397
# Returns         : 
428
# Returns         : Handle to use
398
#
429
#
399
 
-
 
400
sub generateHTML
430
sub generateHTMLHeader
401
{
431
{
402
    my @PackageOrder;
432
    my ($section) = @_;
403
    EnvImport('GBE_RM_URL');
-
 
404
    EnvImport('GBE_DM_URL');
-
 
405
    my $t;
433
    my $handle;
406
    Message("Generate HTML");
-
 
407
 
434
 
-
 
435
    Error ("Bad HTML section id: $section") unless ( exists $htmlData{$section} );
-
 
436
    $currentSection = $section;
-
 
437
    my $fname = $htmlData{$section}{file};
-
 
438
    my $title = $htmlData{$section}{title};
408
 
439
 
409
    open (HTML, '>', 'PackageConversion.html') || Error ("Cannot create HTML");
440
    open ($handle, '>', $fname) || Error ("Cannot create HTML: $fname");
410
    print HTML <<'HEADER';
441
    print $handle <<"HEADER";
411
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
442
<!DOCTYPE $handle PUBLIC "-//W3C//DTD $handle 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
412
<html>
443
<html>
413
<head>
444
<head>
414
<title>Package Conversion Details</title>
445
<title>$title</title>
415
<script type="text/javascript">
446
<script type="text/javascript">
416
function click_expandingMenuHeader(obj,sectionName)
447
function click_expandingMenuHeader(obj,sectionName)
417
{ 
448
{ 
418
var x=document.getElementById("cssprop_" + sectionName).parentNode.className;
449
var x=document.getElementById("cssprop_" + sectionName).parentNode.className;
419
if (x.indexOf("expandingMenuNotSelected")>-1)
450
if (x.indexOf("expandingMenuNotSelected")>-1)
Line 511... Line 542...
511
}
542
}
512
</style>
543
</style>
513
</head>
544
</head>
514
 
545
 
515
HEADER
546
HEADER
516
    print HTML "<body>\n";
547
    print $handle "<body>\n";
517
    print HTML "<p>Generated: " . localtime() . "\n";
548
    print $handle "<p>Generated: " . localtime() . "\n";
518
 
549
 
519
    #
550
    #
520
    #   Generate an index
551
    #   Generate an index
521
    #
552
    #
522
    print HTML htmlH1(anchor("Index", 'Index'));
553
    print $handle htmlH1(anchor("Index", 'Index'));
-
 
554
 
523
    print HTML "<dl>";
555
    print $handle "<dl>";
524
#    print HTML "<dd>" . hRef("#BOMIndex"                ,'Included BOM Projects');
556
    foreach my $section ( sort keys %htmlData )
-
 
557
    {
525
    print HTML "<dd>" . hRef("#ReleaseIndex"            ,'Included Releases');
558
        my $fname = $htmlData{$section}{file};
526
    print HTML "<dd>" . hRef("#ReleaseIndexExcluded"    ,'Excluded Releases');
559
        my $title = $htmlData{$section}{title};
-
 
560
        
527
    print HTML "<dd>" . hRef("#CompletePackageIndex"    ,'Complete Package Index');
561
        print $handle "<dd>" . hRef("$fname"            ,$title);
-
 
562
 
-
 
563
    }
-
 
564
    print $handle "</dl>\n";
-
 
565
 
528
    print HTML "<dd>" . hRef("#PackageDetails"          ,'Package Conversion Details');
566
    unless ( $htmlData{$section}{noHeader} )
-
 
567
    {
529
    print HTML "<dd>" . hRef("#BadPackageVersions"      ,'Bad Package Versions');
568
        print $handle htmlH1('<hr>' . $title);
-
 
569
    }
-
 
570
 
-
 
571
    return $handle;
-
 
572
}
-
 
573
 
530
    print HTML "<dd>" . hRef("#BadPackageVersionsByProject",'Bad Package Versions By Project');
574
#-------------------------------------------------------------------------------
531
    print HTML "<dd>" . hRef("#MultiplePackages"        ,'Releases with duplicated packages');
575
# Function        : generateHTMLTail
-
 
576
#
-
 
577
# Description     : 
-
 
578
#
-
 
579
# Inputs          : 
-
 
580
#
-
 
581
# Returns         : 
-
 
582
#
-
 
583
sub generateHTMLTail
-
 
584
{
-
 
585
    my ($handle) = @_;
532
    print HTML "<dd>" . hRef("#RepoIndex"               ,'Repository Index');
586
    print $handle "</body>\n";
-
 
587
    print $handle "</html>\n";
-
 
588
    close $handle;
-
 
589
 
-
 
590
    $currentSection = '';
-
 
591
}
-
 
592
 
-
 
593
 
533
    print HTML "<dd>" . hRef("#RepoMap"                 ,'Repository Mapping');
594
#-------------------------------------------------------------------------------
-
 
595
# Function        : generateHTML
-
 
596
#
-
 
597
# Description     : 
534
    print HTML "<dd>" . hRef("#NotMapped"               ,'Unmapped Packages');
598
#                   Create per package data
535
    print HTML "<dd>" . hRef("#InSvn"                   ,'Packages in Subversion');
599
#                   Create a nice HTML file so that it can be hyperlinked
-
 
600
#
-
 
601
# Inputs          : 
-
 
602
#
-
 
603
# Returns         : 
-
 
604
#
-
 
605
 
-
 
606
sub generateHTML
-
 
607
{
536
    print HTML "</dl>\n";
608
    my @PackageOrder;
-
 
609
    EnvImport('GBE_RM_URL');
-
 
610
    EnvImport('GBE_DM_URL');
-
 
611
    my $t;
-
 
612
    Message("Generate HTML");
-
 
613
    my $HTML = generateHTMLHeader ('S0');
-
 
614
    print $HTML "This page is a simple index into the other pages that contain the Clearcase to Subversion converstion details.\n";
537
 
615
 
538
    #
616
    #
539
    #   BOM Projects
617
    #   BOM Projects
540
    #
618
    #
541
#    {
619
#    {
542
#        print HTML header('BOMIndex', 'Included BOM Projects');
620
#        print $HTML header('BOMIndex', 'Included BOM Projects');
543
#        print HTML "BOM Projects included in processing. All branches and and SBOMS scanned for essential packages and versions\n";
621
#        print $HTML "BOM Projects included in processing. All branches and and SBOMS scanned for essential packages and versions\n";
544
#
622
#
545
#        print HTML "<dl>\n";
623
#        print $HTML "<dl>\n";
546
#        foreach my $project_id ( sort {$ScmAllBomProjects{$a}{project_name} cmp $ScmAllBomProjects{$b}{project_name} } keys %ScmAllBomProjects )
624
#        foreach my $project_id ( sort {$ScmAllBomProjects{$a}{project_name} cmp $ScmAllBomProjects{$b}{project_name} } keys %ScmAllBomProjects )
547
#        {
625
#        {
548
#            print HTML "<dd>" . linkBomProject($project_id,$ScmAllBomProjects{$project_id}{project_name});
626
#            print $HTML "<dd>" . linkBomProject($project_id,$ScmAllBomProjects{$project_id}{project_name});
549
#        }
627
#        }
550
#        print HTML "</dl>\n";
628
#        print $HTML "</dl>\n";
551
#    }
629
#    }
552
 
630
 
553
    #
631
    #
554
    #   Release List
632
    #   Release List
555
    #
633
    #
556
    my %Projects;
634
    my %Projects;
557
    push @{$Projects{$ScmReleases{$_}{'pName'}}}, $_ foreach ( keys %ScmReleases );
635
    push @{$Projects{$ScmReleases{$_}{'pName'}}}, $_ foreach ( keys %ScmReleases );
558
 
636
 
-
 
637
 
559
    print HTML header('ReleaseIndex', 'Included Releases');
638
    $HTML = generateHTMLHeader ('S1');
560
    print HTML "Releases that will be considered in the conversion process.\n";
639
    print $HTML "Releases that will be considered in the conversion process.\n";
561
    print HTML "<br>Releases are scanned for packages and versions that are used.\n";
640
    print $HTML "<br>Releases are scanned for packages and versions that are used.\n";
562
    print HTML "<dl>\n";
641
    print $HTML "<dl>\n";
563
    foreach ( sort keys %Projects )
642
    foreach ( sort keys %Projects )
564
    {
643
    {
565
        foreach my $rtagid ( sort {$ScmReleases{$a}{name} cmp $ScmReleases{$b}{name}} @{$Projects{$_}} )
644
        foreach my $rtagid ( sort {$ScmReleases{$a}{name} cmp $ScmReleases{$b}{name}} @{$Projects{$_}} )
566
        {
645
        {
567
            next if ( $ScmReleases{$rtagid}{'excluded'} );
646
            next if ( $ScmReleases{$rtagid}{'excluded'} );
568
            print HTML "<dd>" . linkRelease($rtagid);
647
            print $HTML "<dd>" . linkRelease($rtagid);
569
        }
648
        }
570
    }
649
    }
571
    print HTML "</dl>\n";
650
    print $HTML "</dl>\n";
-
 
651
    generateHTMLTail($HTML);
-
 
652
 
572
 
653
 
573
    print HTML header('ReleaseIndexExcluded', 'Excluded Releases');
654
    $HTML = generateHTMLHeader ('S2');
574
    print HTML "Releases that will NOT be considered in the conversion process. These are releases that have been specificly excluded.\n";
655
    print $HTML "Releases that will NOT be considered in the conversion process. These are releases that have been specificly excluded.\n";
575
    print HTML "<dl>\n";
656
    print $HTML "<dl>\n";
576
    foreach ( sort keys %Projects )
657
    foreach ( sort keys %Projects )
577
    {
658
    {
578
        foreach my $rtagid ( sort {$ScmReleases{$a}{name} cmp $ScmReleases{$b}{name}} @{$Projects{$_}} )
659
        foreach my $rtagid ( sort {$ScmReleases{$a}{name} cmp $ScmReleases{$b}{name}} @{$Projects{$_}} )
579
        {
660
        {
580
            next unless ( $ScmReleases{$rtagid}{'excluded'} );
661
            next unless ( $ScmReleases{$rtagid}{'excluded'} );
581
            print HTML "<dd>" . linkRelease($rtagid);
662
            print $HTML "<dd>" . linkRelease($rtagid);
582
        }
663
        }
583
    }
664
    }
584
    print HTML "</dl>\n";
665
    print $HTML "</dl>\n";
-
 
666
    generateHTMLTail($HTML);
585
 
667
 
586
 
668
 
587
    my $currentChar = '';
669
    my $currentChar = '';
588
    undef $t;
670
    undef $t;
589
    @PackageOrder = ();
671
    @PackageOrder = ();
590
    print HTML header('CompletePackageIndex', 'Complete Package Index');
672
    $HTML = generateHTMLHeader ('S3');
591
    print HTML "Complete list of packages. This includes 'Essential Packages' and packages that ";
673
    print $HTML "Complete list of packages. This includes 'Essential Packages' and packages that ";
592
    print HTML "are present in Release Manager, but are not currently used.";
674
    print $HTML "are present in Release Manager, but are not currently used.";
593
    print HTML "<br><button type=\"button\" onclick=\"flipStyleByName('.nonessential', 'display', 'none', '')\" >Show/Hide non Essential</button>";
675
    print $HTML "<br><button type=\"button\" onclick=\"flipStyleByName('.nonessential', 'display', 'none', '')\" >Show/Hide non Essential</button>";
594
    print HTML "<button type=\"button\" onclick=\"flipStyleByName('.essential', 'display', 'none', '')\" >Show/Hide Essential</button>";
676
    print $HTML "<button type=\"button\" onclick=\"flipStyleByName('.essential', 'display', 'none', '')\" >Show/Hide Essential</button>";
595
    
677
    
596
    foreach my $pkgid ( sort {lc($ScmAllPackages{$a}) cmp lc($ScmAllPackages{$b}) } keys %ScmAllPackages )
678
    foreach my $pkgid ( sort {lc($ScmAllPackages{$a}) cmp lc($ScmAllPackages{$b}) } keys %ScmAllPackages )
597
    {
679
    {
598
        my $thisChar = uc(substr($ScmAllPackages{$pkgid}, 0, 1 ));
680
        my $thisChar = uc(substr($ScmAllPackages{$pkgid}, 0, 1 ));
599
        if ( $thisChar ne $currentChar )
681
        if ( $thisChar ne $currentChar )
600
        {
682
        {
601
            print HTML $t->getTable if ( $t );
683
            print $HTML $t->getTable if ( $t );
602
            $t = new HTML::Table();
684
            $t = new HTML::Table();
603
 
685
 
604
            endExpander() if ($currentChar);
686
            endExpander($HTML) if ($currentChar);
605
            startExpander("Letter2$thisChar", $thisChar);
687
            startExpander($HTML, "Letter2$thisChar", $thisChar);
606
            $currentChar = $thisChar;
688
            $currentChar = $thisChar;
607
        }
689
        }
608
        my $packageRef;
690
        my $packageRef;
609
        my $version_tree = '';
691
        my $version_tree = '';
610
        my $import_log = '';
692
        my $import_log = '';
Line 628... Line 710...
628
            $class = 'essential';
710
            $class = 'essential';
629
        }
711
        }
630
        $t->addRow($packageRef, linkPkg($pkgid, '(Release Manager)'),$version_tree, $import_log, $marker);
712
        $t->addRow($packageRef, linkPkg($pkgid, '(Release Manager)'),$version_tree, $import_log, $marker);
631
        $t->setRowClass  (-1, $class);
713
        $t->setRowClass  (-1, $class);
632
    }
714
    }
633
    print HTML $t->getTable if ( $t );
715
    print $HTML $t->getTable if ( $t );
634
    endExpander() if ($currentChar);
716
    endExpander($HTML) if ($currentChar);
-
 
717
    generateHTMLTail($HTML);
635
 
718
 
636
    #
719
    #
637
    #   Package Details
720
    #   Package Details
638
    #
721
    #
639
    print HTML header('PackageDetails', 'Package Conversion Details');
722
    $HTML = generateHTMLHeader ('S4');
640
    $t = new HTML::Table( -border=>1 );
723
    $t = new HTML::Table( -border=>1 );
641
    foreach my $pkgid ( @PackageOrder )
724
    foreach my $pkgid ( @PackageOrder )
642
    {
725
    {
643
        my @badVobs;
726
        my @badVobs;
644
        $t->addRow('&nbsp;');
727
        $t->addRow('&nbsp;');
645
        $t->setRowClass  (-1, 'packageTitle');
728
        $t->setRowClass  (-1, 'packageTitle');
646
        $t->setCellColSpan(-1, 1, 2);
729
        $t->setCellColSpan(-1, 1, 2);
647
        
730
        
648
        $t->addRow( anchor("Package_$PackageData{$pkgid}{name}", 'Name:'), linkPkg($pkgid) . linkImage($pkgid, ' (Version Tree)') . linkImportLog( $pkgid, ' (Import Log)' ) );
731
        $t->addRow( anchor("$PackageData{$pkgid}{name}", 'Name:'), linkPkg($pkgid) . linkImage($pkgid, ' (Version Tree)') . linkImportLog( $pkgid, ' (Import Log)' ) );
649
#        $t->setRowHead(-1,1);
732
#        $t->setRowHead(-1,1);
650
        
733
        
651
        my $t2 = new HTML::Table( -border=>0, -padding=>0, -spacing=>0 );
734
        my $t2 = new HTML::Table( -border=>0, -padding=>0, -spacing=>0 );
652
        foreach my $pvid ( sort {$ScmPackages{$a}{fullVersion} cmp $ScmPackages{$b}{fullVersion} } @{$PackageSet{$pkgid}} )
735
        foreach my $pvid ( sort {$ScmPackages{$a}{fullVersion} cmp $ScmPackages{$b}{fullVersion} } @{$PackageSet{$pkgid}} )
653
        {
736
        {
Line 668... Line 751...
668
        $t->addRow("Versions used:", $t2->getTable);
751
        $t->addRow("Versions used:", $t2->getTable);
669
        $t->addRow("Type:", $PackageData{$pkgid}{type});
752
        $t->addRow("Type:", $PackageData{$pkgid}{type});
670
        $t->addRow("Projects:",join (',', @{$PackageData{$pkgid}{suffixes}} ));
753
        $t->addRow("Projects:",join (',', @{$PackageData{$pkgid}{suffixes}} ));
671
 
754
 
672
        my $youngest = $PackageData{$pkgid}{youngAge};
755
        my $youngest = $PackageData{$pkgid}{youngAge};
673
        my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || $youngest;
756
        my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || 0;
-
 
757
        my $youngestNonBuildadm = $PackageData{$pkgid}{nonBuildadm} || 0;
-
 
758
 
-
 
759
        $youngest = int($youngest);
-
 
760
        $youngestNonRipple = int($youngestNonRipple) || '-';
-
 
761
        $youngestNonBuildadm = int($youngestNonBuildadm) || '-';
-
 
762
 
674
        $t->addRow("Youngest:", int($youngestNonRipple) . " Days (NonRipple). " . int($youngest) . " Days (Any)" );
763
        $t->addRow("Youngest:", "$youngestNonRipple Days (NonRipple). $youngestNonBuildadm Days (NonBuildadm). $youngest Days (any Build)" );
675
        $t->addRow("Views:", join (',', keys %{$PackageData{$pkgid}{view}}));
764
        $t->addRow("Views:", join (',', keys %{$PackageData{$pkgid}{view}}));
676
 
765
 
677
        if ( $PackageData{$pkgid}{MultiVob} )
766
        if ( $PackageData{$pkgid}{MultiVob} )
678
        {
767
        {
679
            my $t2 = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
768
            my $t2 = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
Line 740... Line 829...
740
        my $txt = join( '<br>', values %RepoList);
829
        my $txt = join( '<br>', values %RepoList);
741
        $txt = ' : ' . $txt if ( $txt );
830
        $txt = ' : ' . $txt if ( $txt );
742
        $t->addRow("Repo:", hRef("#Repo_$repo", $repo). $txt );
831
        $t->addRow("Repo:", hRef("#Repo_$repo", $repo). $txt );
743
    }
832
    }
744
    $t->setColClass (1, 'listTitle' );
833
    $t->setColClass (1, 'listTitle' );
745
    print HTML $t->getTable;
834
    print $HTML $t->getTable;
-
 
835
    generateHTMLTail($HTML);
746
    #
836
    #
747
    #   Bad Package information
837
    #   Bad Package information
748
    #
838
    #
749
Message("Bad Package Versions");
839
Message("Bad Package Versions");
750
    my %BadByProject;
840
    my %BadByProject;
751
    my $last_proj_id = 0;
841
    my $last_proj_id = 0;
752
 
842
 
753
    print HTML header('BadPackageVersions', 'Bad Package Versions');
843
    $HTML = generateHTMLHeader ('S5');
754
    print HTML "These package-versions cannot be reproduced from ClearCase. This may be due to\n";
844
    print $HTML "These package-versions cannot be reproduced from ClearCase. This may be due to\n";
755
    print HTML "<dl><dd>Invalid Release Manager information";
845
    print $HTML "<dl><dd>Invalid Release Manager information";
756
    print HTML "<dd>Incorrect Release Manager Data";
846
    print $HTML "<dd>Incorrect Release Manager Data";
757
    print HTML "<dd>ClearCase label and Path do not result in a view with files";
847
    print $HTML "<dd>ClearCase label and Path do not result in a view with files";
758
    print HTML "</dl>";
848
    print $HTML "</dl>";
759
    $t = new HTML::Table( -border=>1 );
849
    $t = new HTML::Table( -border=>1 );
760
    $t->addRow( 'Package Version','VCS Tag' );
850
    $t->addRow( 'Package Version','VCS Tag' );
761
    $t->setRowHead(1,1);
851
    $t->setRowHead(1,1);
762
    foreach my $pvid ( sort {lc($ScmPackages{$a}{name}) cmp lc($ScmPackages{$b}{name}) } keys %ScmPackages )
852
    foreach my $pvid ( sort {lc($ScmPackages{$a}{name}) cmp lc($ScmPackages{$b}{name}) } keys %ScmPackages )
763
    {
853
    {
Line 778... Line 868...
778
        {
868
        {
779
            $t2->addRow("Used Indirectly by:");
869
            $t2->addRow("Used Indirectly by:");
780
            $t2->addRow(linkRelease($_, $pvid)) foreach ( @$iusers );
870
            $t2->addRow(linkRelease($_, $pvid)) foreach ( @$iusers );
781
            push @{$BadByProject{$_}{indirect}}, $pvid foreach ( @$iusers );
871
            push @{$BadByProject{$_}{indirect}}, $pvid foreach ( @$iusers );
782
        }
872
        }
783
        $t->addRow( anchor("BadVcs_$pvid",linkPvid($pvid)), $t2->getTable );
873
        $t->addRow( anchor("$pvid",linkPvid($pvid)), $t2->getTable );
784
    }
874
    }
785
    $t->setColClass (1, 'listTitle' );
875
    $t->setColClass (1, 'listTitle' );
786
    print HTML $t->getTable;
876
    print $HTML $t->getTable;
-
 
877
    generateHTMLTail($HTML);
787
 
878
 
788
    #
879
    #
789
    #   Bad package vesrions by project
880
    #   Bad package vesrions by project
790
    #
881
    #
791
Message("Bad Package Versions by Project");
882
Message("Bad Package Versions by Project");
792
    print HTML header('BadPackageVersionsByProject', 'Bad Package Versions By Project');
883
    $HTML = generateHTMLHeader ('S6');
793
    $t = new HTML::Table( -border=>1 );
884
    $t = new HTML::Table( -border=>1 );
794
    $t->addRow( 'Release','Package');
885
    $t->addRow( 'Release','Package');
795
    $t->setRowHead(1,1);
886
    $t->setRowHead(1,1);
796
    $last_proj_id = 0;
887
    $last_proj_id = 0;
797
 
888
 
Line 836... Line 927...
836
        $t->addRow(linkRelease($rtag_id, undef, 1), $t2->getTable  );
927
        $t->addRow(linkRelease($rtag_id, undef, 1), $t2->getTable  );
837
    }
928
    }
838
 
929
 
839
    $t->setColClass (1, 'listTitle' );
930
    $t->setColClass (1, 'listTitle' );
840
    $t->setColHead(1,1);
931
    $t->setColHead(1,1);
841
    print HTML $t->getTable;
932
    print $HTML $t->getTable;
842
 
-
 
843
Message("Repo Index");
-
 
844
    print HTML header('RepoIndex', 'Repository Index');
-
 
845
    print HTML "A summary of proposed Repostories and Paths\n";
-
 
846
 
-
 
847
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
-
 
848
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
-
 
849
    $t->setCellColSpan(1, 1, 2);
-
 
850
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %RepoSubIndex )
-
 
851
    {
-
 
852
            next if ( $repo eq 'UNKNOWN' );
-
 
853
            next if ( $repo eq 'SVN' );
-
 
854
            my $count = '';
-
 
855
            if ( exists $RepoSubIndex{$repo}{'-'}   )
-
 
856
            {
-
 
857
                $count = @{$RepoSubIndex{$repo}{'-'}};
-
 
858
            }
-
 
859
            $t->addRow( hRef("#Repo_$repo", $repo), '', $count  );
-
 
860
            $t->setCellColSpan($t->getTableRows(), 1, 2);
-
 
861
 
-
 
862
            foreach my $path ( sort {uc($a) cmp uc($b) } keys %{$RepoSubIndex{$repo}} )
-
 
863
            {
-
 
864
                    next if ( $path eq '-' );
-
 
865
                    my $depth = $path =~ tr~/~~;
-
 
866
                    my $warn = ($depth > 2) ? ' - Deeply nested' : '';
-
 
867
                    my $count = (@{$RepoSubIndex{$repo}{$path}});
-
 
868
                    $warn .= ' - Only One Package' if ( $count < 2 );
-
 
869
 
-
 
870
                    $t->addRow( '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', hRef("#Repo_$repo/$path", $path), $count, $warn);
-
 
871
            }
-
 
872
 
-
 
873
    }
-
 
874
    
-
 
875
    print HTML $t->getTable;
933
    generateHTMLTail($HTML);
876
 
934
 
877
    #
935
    #
878
    #   Releases that have multiple instances of the same package in them
936
    #   Releases that have multiple instances of the same package in them
879
    #
937
    #
880
Message("Multiple Packages");
938
Message("Multiple Packages");
881
    print HTML header('MultiplePackages', 'Releases with duplicated packages');
939
    $HTML = generateHTMLHeader ('S7');
882
    print HTML "Releases that have multiple instances of the same package\n";
940
    print $HTML "Releases that have multiple instances of the same package\n";
883
#DebugDumpData("ReleasePackages", \%ReleasePackages );
941
#DebugDumpData("ReleasePackages", \%ReleasePackages );
884
 
942
 
885
    $t = new HTML::Table( -border=>1 );
943
    $t = new HTML::Table( -border=>1 );
886
    $t->addRow( 'Release','Package');
944
    $t->addRow( 'Release','Package');
887
    $t->setRowHead(1,1);
945
    $t->setRowHead(1,1);
Line 920... Line 978...
920
 
978
 
921
        $t->addRow(linkRelease($rtag_id, undef, 1), $t2->getTable  );
979
        $t->addRow(linkRelease($rtag_id, undef, 1), $t2->getTable  );
922
    }
980
    }
923
    $t->setColClass (1, 'listTitle' );
981
    $t->setColClass (1, 'listTitle' );
924
    $t->setColHead(1,1);
982
    $t->setColHead(1,1);
925
    print HTML $t->getTable;
983
    print $HTML $t->getTable;
-
 
984
    generateHTMLTail($HTML);
926
    
985
    
927
 
986
 
928
Message("Repo Index");
987
Message("Repo Index");
929
    print HTML header('RepoIndex', 'Repository Index');
988
    $HTML = generateHTMLHeader ('S8');
930
    print HTML "A summary of proposed Repostories and Paths\n";
989
    print $HTML "A summary of proposed Repostories and Paths\n";
931
 
990
 
932
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
991
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
933
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
992
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
934
    $t->setCellColSpan(1, 1, 2);
993
    $t->setCellColSpan(1, 1, 2);
935
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %RepoSubIndex )
994
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %RepoSubIndex )
Line 955... Line 1014...
955
                    $t->addRow( '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', hRef("#Repo_$repo/$path", $path), $count, $warn);
1014
                    $t->addRow( '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', hRef("#Repo_$repo/$path", $path), $count, $warn);
956
            }
1015
            }
957
 
1016
 
958
    }
1017
    }
959
    
1018
    
960
    print HTML $t->getTable;
1019
    print $HTML $t->getTable;
-
 
1020
    generateHTMLTail($HTML);
961
 
1021
 
962
 
1022
 
963
 
1023
 
964
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
1024
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
965
#DebugDumpData("Repos", \%Repos);
1025
#DebugDumpData("Repos", \%Repos);
966
    
1026
    
967
    #
1027
    #
968
    #   Repo back reference
1028
    #   Repo back reference
969
    #
1029
    #
970
Message("Repo Map");
1030
Message("Repo Map");
971
    print HTML header('RepoMap', 'Repository Mapping');
1031
    $HTML = generateHTMLHeader ('S9');
972
    print HTML "Proposed Repostories and Paths with package mapping and ClearCase Path\n";
1032
    print $HTML "Proposed Repostories and Paths with package mapping and ClearCase Path\n";
973
 
1033
 
974
    $t = new HTML::Table( -border=>1 );
1034
    $t = new HTML::Table( -border=>1 );
975
    $t->addRow( 'Repository Path', 'Package Name,Original Vob Path(s),Last Build in Days. NonRipple [Any]' );
1035
    $t->addRow( 'Repository Path', 'Package Name,Original Vob Path(s),Last Build NonBuildadm [ANY]]' );
976
 
1036
 
977
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %Repos )
1037
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %Repos )
978
    {
1038
    {
979
        next if ( $repo eq 'SVN' );
1039
        next if ( $repo eq 'SVN' );
980
        next if ( $repo eq 'UNKNOWN' );
1040
        next if ( $repo eq 'UNKNOWN' );
Line 991... Line 1051...
991
            if ( $t2->getTableRows() )
1051
            if ( $t2->getTableRows() )
992
            {
1052
            {
993
                $t2->setColClass (1, 'listTitle' );
1053
                $t2->setColClass (1, 'listTitle' );
994
            }
1054
            }
995
            my $youngest = $PackageData{$pkgid}{youngAge};
1055
            my $youngest = $PackageData{$pkgid}{youngAge};
996
            my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || $youngest;
1056
            my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || 0;
-
 
1057
            my $youngestNonBuildadm = $PackageData{$pkgid}{nonBuildadm} || 0;
997
 
1058
 
-
 
1059
            $youngest =  int($youngest);
-
 
1060
            $youngestNonRipple =  int($youngestNonRipple) || '-';
-
 
1061
            $youngestNonBuildadm = int($youngestNonBuildadm) || '-';
-
 
1062
            
998
            $t1->addRow( linkPackageDetails($pkgid),
1063
            $t1->addRow( linkPackageDetails($pkgid),
999
                         $t2->getTable(),
-
 
1000
                         int($youngestNonRipple) . " [" . int($youngest) . "]"  );
1064
                         $t2->getTable(), "$youngestNonBuildadm [$youngest]"  );
1001
        }
1065
        }
1002
 
1066
 
1003
        if ( $t1->getTableRows() )
1067
        if ( $t1->getTableRows() )
1004
        {
1068
        {
1005
            $t1->setColWidth(1,'30%');
1069
            $t1->setColWidth(1,'30%');
1006
            $t1->setColClass (1, 'listTitle' );
1070
            $t1->setColClass (1, 'listTitle' );
1007
            $t1->setColWidth(3,'10%');
1071
            $t1->setColWidth(3,'10%');
1008
        }
1072
        }
1009
        $t->addRow( anchor("Repo_$repo",$repo), $t1->getTable() );
1073
        $t->addRow( anchor("$repo",$repo), $t1->getTable() );
1010
 
1074
 
1011
    }
1075
    }
1012
    $t->setColClass (1, 'listTitle' );
1076
    $t->setColClass (1, 'listTitle' );
1013
    $t->setColHead(1,1);
1077
    $t->setColHead(1,1);
1014
    print HTML $t->getTable;
1078
    print $HTML $t->getTable;
-
 
1079
    generateHTMLTail($HTML);
1015
    
1080
    
1016
    #
1081
    #
1017
    #   Highlight packages that have not been mapped to a Repo
1082
    #   Highlight packages that have not been mapped to a Repo
1018
    #
1083
    #
1019
Message("Not Mapped");
1084
Message("Not Mapped");
1020
    print HTML header('NotMapped', 'Unmapped Packages');
1085
    $HTML = generateHTMLHeader ('SA');
1021
    print HTML "Packages that have not been mapped to a Repository\n";
1086
    print $HTML "Packages that have not been mapped to a Repository\n";
1022
    $t = new HTML::Table( -border=>1 );
1087
    $t = new HTML::Table( -border=>1 );
1023
    foreach my $pkgid ( @{$Repos{UNKNOWN}} )
1088
    foreach my $pkgid ( @{$Repos{UNKNOWN}} )
1024
    {
1089
    {
1025
        my $flag_badCC;
1090
        my $flag_badCC;
1026
        my $flag_multi;
1091
        my $flag_multi;
Line 1042... Line 1107...
1042
        push @data, "Bad VcsTag" if $flag_badVob;
1107
        push @data, "Bad VcsTag" if $flag_badVob;
1043
        $t->addRow( linkPackageDetails($pkgid), join( '<br>', @data) );
1108
        $t->addRow( linkPackageDetails($pkgid), join( '<br>', @data) );
1044
    }
1109
    }
1045
    
1110
    
1046
    $t->setColClass (1, 'listTitle' );
1111
    $t->setColClass (1, 'listTitle' );
1047
    print HTML $t->getTable;
1112
    print $HTML $t->getTable;
-
 
1113
    generateHTMLTail($HTML);
1048
    
1114
 
1049
    #
1115
    #
1050
    #   Packages already under Subversion
1116
    #   Packages already under Subversion
1051
    #
1117
    #
1052
Message("In Subversion");
1118
Message("In Subversion");
1053
    print HTML header('InSvn', 'Packages in Subversion');
1119
    $HTML = generateHTMLHeader ('SB');
1054
    print HTML "Packages that are currently in Subversion\n";
1120
    print $HTML "Packages that are currently in Subversion\n";
1055
    print HTML "<br>Packages in Subversion: ". scalar @{$Repos{SVN}} ."\n";
1121
    print $HTML "<br>Packages in Subversion: ". scalar @{$Repos{SVN}} ."\n";
1056
    print HTML anchor("Repo_SVN",'SVN');
1122
    print $HTML anchor("SVN",'SVN');
1057
 
1123
 
1058
    $t = new HTML::Table( -border=>1 );
1124
    $t = new HTML::Table( -border=>1 );
1059
    foreach my $pkgid ( @{$Repos{SVN}} )
1125
    foreach my $pkgid ( @{$Repos{SVN}} )
1060
    {
1126
    {
1061
        my %RepoList;
1127
        my %RepoList;
Line 1067... Line 1133...
1067
                $RepoList{$1} = svnLink($1) unless exists $RepoList{$1};
1133
                $RepoList{$1} = svnLink($1) unless exists $RepoList{$1};
1068
            }
1134
            }
1069
        }
1135
        }
1070
        $t->addRow( linkPackageDetails($pkgid), join( '<br>', values %RepoList) );
1136
        $t->addRow( linkPackageDetails($pkgid), join( '<br>', values %RepoList) );
1071
    }
1137
    }
1072
    print HTML $t->getTable;
1138
    print $HTML $t->getTable;
1073
 
1139
 
1074
print HTML "</body>\n";
-
 
1075
print HTML "</html>\n";
1140
    generateHTMLTail($HTML);
1076
close HTML;
-
 
1077
Message ("Created: PackageConversion.html");
1141
Message ("Created: PackageConversion.html");
1078
 
-
 
1079
#DebugDumpData("PackageData",\%PackageData );
-
 
1080
#DebugDumpData("Views", \%Views );
-
 
1081
#DebugDumpData("Vobs", \%Vobs );
-
 
1082
#DebugDumpData("Repos", \%Repos );
-
 
1083
 
-
 
1084
    #
-
 
1085
    #   Generate VOB XREF too
-
 
1086
    #
-
 
1087
    open (HTML, '>', 'RepoMap.html') || Error ("Cannot create HTML");
-
 
1088
    print HTML <<'HEADER';
-
 
1089
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
-
 
1090
<html>
-
 
1091
<head>
-
 
1092
<title>Repository Mapping</title>
-
 
1093
<style TYPE="text/css">
-
 
1094
.packageTitle {
-
 
1095
    background-color:#FFFF99;
-
 
1096
}
-
 
1097
 
-
 
1098
.listTitle {
-
 
1099
    text-align:left;
-
 
1100
    vertical-align:top;
-
 
1101
}
1142
}
1102
 
1143
 
1103
.paddedTable {
-
 
1104
    border-spacing: 10px 0px;
-
 
1105
}
-
 
1106
</style>
1144
sub hRef
1107
</head>
-
 
1108
 
-
 
1109
HEADER
-
 
1110
    print HTML "<body>\n";
-
 
1111
    print HTML htmlH1('Clearcase VOB to Subversion Repository mapping');
-
 
1112
    print HTML "<p>Generated: " . localtime() . "\n";
-
 
1113
 
-
 
1114
    #
-
 
1115
    #   Generate an index
-
 
1116
    #
-
 
1117
    print HTML htmlH1(anchor("Index", 'Index'));
-
 
1118
    print HTML "<dl>";
-
 
1119
    print HTML "<dd>" . hRef("#RepoIndex"               ,'Repository Index');
-
 
1120
    print HTML "<dd>" . hRef("#RepoMap"                 ,'Repository Mapping');
-
 
1121
    print HTML "<dd>" . hRef("#NotMapped"               ,'Unmapped Packages');
-
 
1122
    print HTML "</dl>\n";
-
 
1123
 
-
 
1124
 
-
 
1125
    print HTML header('RepoIndex', 'Repository Index');
-
 
1126
    print HTML "A summary of proposed Repostories and Paths\n";
-
 
1127
#DebugDumpData("RepoSubIndex", \%RepoSubIndex );
-
 
1128
#DebugDumpData("Repos", \%Repos );
-
 
1129
 
-
 
1130
 
1145
{
1131
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
-
 
1132
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
-
 
1133
    $t->setCellColSpan(1, 1, 2);
-
 
1134
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %RepoSubIndex )
-
 
1135
    {
-
 
1136
            next if ( $repo eq 'UNKNOWN' );
-
 
1137
            next if ( $repo eq 'SVN' );
1146
    my ($url, $text, $target) = @_;
1138
            my $count = '';
1147
    my $ttext = '';
1139
            if ( exists $RepoSubIndex{$repo}{'-'}   )
-
 
1140
            {
-
 
1141
                $count = @{$RepoSubIndex{$repo}{'-'}};
-
 
1142
            }
-
 
1143
            $t->addRow( hRef("#Repo_$repo", $repo), '', $count  );
-
 
1144
            $t->setCellColSpan($t->getTableRows(), 1, 2);
-
 
1145
 
-
 
1146
#            delete $RepoSubIndex{$repo}{'-'};
-
 
1147
 
-
 
1148
            foreach my $path ( sort {uc($a) cmp uc($b) } keys %{$RepoSubIndex{$repo}} )
-
 
1149
            {
-
 
1150
                    next if ( $path eq '-' );
-
 
1151
                    my $depth = $path =~ tr~/~~;
-
 
1152
                    my $warn = ($depth > 2) ? ' - Deeply nested' : '';
-
 
1153
                    my $count = (@{$RepoSubIndex{$repo}{$path}});
-
 
1154
                    $warn .= ' - Only One Package' if ( $count < 2 );
-
 
1155
 
-
 
1156
                    $t->addRow( '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', hRef("#Repo_$repo/$path", $path), $count, $warn);
-
 
1157
            }
-
 
1158
 
-
 
1159
    }
-
 
1160
    
-
 
1161
    print HTML $t->getTable;
-
 
1162
    
-
 
1163
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
-
 
1164
#DebugDumpData("Repos", \%Repos);
-
 
1165
    
-
 
1166
    #
-
 
1167
    #   Repo back reference
-
 
1168
    #
-
 
1169
    print HTML header('RepoMap', 'Repository Mapping');
-
 
1170
    print HTML "Proposed Repostories and Paths with package mapping and ClearCase Path\n";
-
 
1171
 
1148
 
1172
    $t = new HTML::Table( -border=>1 );
1149
    if ( $url =~ m~^#(.*?)_~ )
1173
    $t->addRow( 'Repository Path', 'Package Name and Original Vob Path(s)' );
-
 
1174
    
-
 
1175
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %Repos )
-
 
1176
    {
1150
    {
1177
        next if ( $repo eq 'SVN' );
-
 
1178
        next if ( $repo eq 'UNKNOWN' );
-
 
1179
        my @data;
1151
        my $tag = $1;
1180
        my $t1 = new HTML::Table( -border=>1,-width=>'100%', -style=>"border-collapse:collapse" );
-
 
1181
        
-
 
1182
        foreach my $pkgid ( @{$Repos{$repo}} )
1152
        foreach my $section ( keys %htmlData )
1183
        {
1153
        {
1184
            my $t2 = new HTML::Table(-border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
-
 
1185
            foreach my $vob ( keys %{$PackageData{$pkgid}{vobPath}} )
-
 
1186
            {
-
 
1187
                    $t2->addRow( $vob );
-
 
1188
            }
-
 
1189
            if ( $t2->getTableRows() )
1154
            if ( $htmlData{$section}{tag} eq $1 )
1190
            {
1155
            {
-
 
1156
                $url = $htmlData{$section}{file} . $url;
1191
                $t2->setColClass (1, 'listTitle' );
1157
                $target = '_Page'.$section unless ( $target );
1192
            }
1158
            }
1193
            $t1->addRow( linkPkg($pkgid), $t2->getTable() );
-
 
1194
        }
1159
        }
1195
        if ( $t1->getTableRows() )
-
 
1196
        {
-
 
1197
            $t1->setColWidth(1,'30%');
-
 
1198
            $t1->setColClass (1, 'listTitle' );
-
 
1199
        }
-
 
1200
        $t->addRow( anchor("Repo_$repo",$repo), $t1->getTable() );
-
 
1201
 
-
 
1202
    }
1160
    }
1203
    $t->setColClass (1, 'listTitle' );
-
 
1204
    $t->setColHead(1,1);
-
 
1205
    print HTML $t->getTable;
-
 
1206
    
-
 
1207
    #
-
 
1208
    #   Highlight packages that have not been mapped to a Repo
-
 
1209
    #
-
 
1210
    print HTML header('NotMapped', 'Unmapped Packages');
-
 
1211
    print HTML "Packages that have not been mapped to a Repository\n";
-
 
1212
    $t = new HTML::Table( -border=>1 );
-
 
1213
    foreach my $pkgid ( @{$Repos{UNKNOWN}} )
-
 
1214
    {
-
 
1215
        my $flag_badCC;
-
 
1216
        my $flag_multi;
-
 
1217
        my $flag_badVob;
-
 
1218
 
1161
 
1219
        $flag_multi  = 1 if $PackageData{$pkgid}{MultiVob};
-
 
1220
        $flag_badVob = 1 if $PackageData{$pkgid}{BadVob};
-
 
1221
 
-
 
1222
        foreach my $pvid ( @{$PackageSet{$pkgid}} )
-
 
1223
        {
-
 
1224
            $flag_badCC  = 1 if ( $ScmPackages{$pvid}{BadCCView} );
-
 
1225
            $flag_multi  = 1 if ( $ScmPackages{$pvid}{MultiVob} );
-
 
1226
            $flag_badVob = 1 if ( $ScmPackages{$pvid}{BadVob} );
-
 
1227
        }
-
 
1228
 
-
 
1229
        my @data;
-
 
1230
        push @data, "Bad ClearCase View" if $flag_badCC;
-
 
1231
        push @data, "Multiple Vobs" if $flag_multi;
-
 
1232
        push @data, "Bad VcsTag" if $flag_badVob;
-
 
1233
        $t->addRow( linkPkg($pkgid), join( '<br>', @data) );
-
 
1234
    }
-
 
1235
    
-
 
1236
    $t->setColClass (1, 'listTitle' );
-
 
1237
    print HTML $t->getTable;
-
 
1238
    
-
 
1239
    print HTML "</body>\n";
-
 
1240
    print HTML "</html>\n";
-
 
1241
    close HTML;
-
 
1242
    Message ("Created: RepoMap.html");
-
 
1243
    
-
 
1244
}
-
 
1245
 
-
 
1246
sub hRef
-
 
1247
{
-
 
1248
    my ($url, $text, $target) = @_;
-
 
1249
    my $ttext = '';
-
 
1250
    $ttext = ' TARGET="' . $target . '"' if ( defined $target );
1162
    $ttext = ' TARGET="' . $target . '"' if ( defined $target );
1251
    return ( '<a href="' . $url . '"' . $ttext . '>' . $text . '</a>' );
1163
    return ( '<a href="' . $url . '"' . $ttext . '>' . $text . '</a>' );
1252
}
1164
}
1253
 
1165
 
1254
sub anchor
1166
sub anchor
1255
{
1167
{
1256
    my ($name, $text) = @_;
1168
    my ($name, $text) = @_;
-
 
1169
    my $prefix = '';
-
 
1170
    if ( $currentSection )
-
 
1171
    {
-
 
1172
        $prefix = $htmlData{$currentSection}{tag};
-
 
1173
        $prefix = $prefix . '_' if ( $prefix );
-
 
1174
    }
1257
    return ( '<a name="' . $name . '">' . $text . '</a>' );
1175
    return ( '<a name="' . $prefix . $name . '">' . $text . '</a>' );
1258
}
1176
}
1259
 
1177
 
1260
 
1178
 
1261
sub htmlH1
1179
sub htmlH1
1262
{
1180
{
1263
    my ($text) = @_;
1181
    my ($text) = @_;
1264
    return '<h1>' . $text . '</h1>';
1182
    return '<h1>' . $text . '</h1>';
1265
}
1183
}
1266
 
1184
 
1267
my $headerCount = 0;
-
 
1268
sub header
-
 
1269
{
-
 
1270
    my ($name, $text) = @_;
-
 
1271
    $headerCount++;
-
 
1272
    return htmlH1('<hr>'
-
 
1273
                . anchor($name, $text)
-
 
1274
                . anchor("Section_" . $headerCount, '')
-
 
1275
                . hRef("#Index"                        ,'<sup><font size="2"> [Top]</font></sup>')
-
 
1276
                . hRef("#Section_" . ($headerCount - 1),'<sup><font size="2"> [Prev]</font></sup>')
-
 
1277
                . hRef("#Section_" . ($headerCount + 1),'<sup><font size="2"> [Next]</font></sup>')
-
 
1278
                );
-
 
1279
}
-
 
1280
 
-
 
1281
sub linkBomProject
1185
sub linkBomProject
1282
{
1186
{
1283
    my ($projId, $text) = @_;
1187
    my ($projId, $text) = @_;
1284
    my $ref = $GBE_DM_URL . "/Default.asp?proj_id=$projId";
1188
    my $ref = $GBE_DM_URL . "/Default.asp?proj_id=$projId";
1285
 
1189
 
Line 1376... Line 1280...
1376
#
1280
#
1377
# Returns         : 
1281
# Returns         : 
1378
#
1282
#
1379
sub startExpander
1283
sub startExpander
1380
{
1284
{
1381
    my ($name, $text) = @_;
1285
    my ($HTML, $name, $text) = @_;
1382
    print HTML <<EXPANDER;
1286
    print $HTML <<EXPANDER;
1383
<div class="expandingMenu expandingMenuNotSelected">
1287
<div class="expandingMenu expandingMenuNotSelected">
1384
    <div onclick='click_expandingMenuHeader(this,"$name")' class="expandingMenuHeader" >$text</div>
1288
    <div onclick='click_expandingMenuHeader(this,"$name")' class="expandingMenuHeader" >$text</div>
1385
	<div id="cssprop_$name" class="expandingMenuGroup" style="display:none;">
1289
	<div id="cssprop_$name" class="expandingMenuGroup" style="display:none;">
1386
EXPANDER
1290
EXPANDER
1387
}
1291
}
1388
 
1292
 
1389
sub endExpander
1293
sub endExpander
1390
{
1294
{
-
 
1295
    my ($HTML) = @_;
1391
    print HTML "</div></div>\n";
1296
    print $HTML "</div></div>\n";
1392
}
1297
}
1393
 
1298
 
1394
 
1299
 
1395
#    if ( 0 )
1300
#    if ( 0 )
1396
#    {
1301
#    {