Subversion Repositories DevTools

Rev

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

Rev 2040 Rev 2429
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 232... Line 266...
232
 
266
 
233
 
267
 
234
#
268
#
235
#   Map packages into Repos
269
#   Map packages into Repos
236
#
270
#
-
 
271
my %Repos_lowercase;
237
my %Repos;
272
my %Repos;
238
my %RepoSubIndex;
273
my %RepoSubIndex;
239
Message ("Mapping Vobs to Repo");
274
Message ("Mapping Vobs to Repo");
240
foreach my $pkgid ( keys %PackageSet )
275
foreach my $pkgid ( keys %PackageSet )
241
{
276
{
242
    my $repo = mapPackage($pkgid);
277
    my $repo = mapPackage($pkgid);
243
    Error ("Unmapped package: $PackageData{$pkgid}{name}" ) unless ( $repo );
278
    Error ("Unmapped package: $PackageData{$pkgid}{name}" ) unless ( $repo );
-
 
279
    my $repo_lc = lc $repo;
-
 
280
 
-
 
281
    if (exists $Repos_lowercase{$repo_lc} && $Repos_lowercase{$repo_lc} ne $repo )
-
 
282
    {
-
 
283
        Error ("Package mapping: Mapped to Repo with same name, but different case",
-
 
284
               "Package: $PackageData{$pkgid}{name}",
-
 
285
               "Mapped repo   : $repo",
-
 
286
               "Already mapped: $Repos_lowercase{$repo_lc}");
-
 
287
    }
244
 
288
 
-
 
289
    $Repos_lowercase{$repo_lc} = $repo;
245
    $PackageData{$pkgid}{mappedRepo} = $repo;
290
    $PackageData{$pkgid}{mappedRepo} = $repo;
246
    push @{$Repos{$repo}}, $pkgid;
291
    push @{$Repos{$repo}}, $pkgid;
-
 
292
 
-
 
293
    if ( $repo eq 'SVN' )
-
 
294
    {
-
 
295
        my %RepoList;
-
 
296
        foreach my $pvid ( @{$PackageSet{$pkgid}} )
-
 
297
        {
-
 
298
            my $repo = $ScmPackages{$pvid}{'vcstag'};
-
 
299
            if ( $repo =~ m~SVN::AUPERASVN01/(.*)/(.*?)(/tags/|/branches/|/trunk)~i )
-
 
300
            {
-
 
301
                my $repo = $1;
-
 
302
                unless( exists $RepoList{$repo} )
-
 
303
                {
-
 
304
                    $RepoList{$repo} = 1 ;
-
 
305
                    $PackageData{$pkgid}{mappedRepo} = $repo;
-
 
306
                    push @{$Repos{$repo}}, $pkgid;
-
 
307
                }
-
 
308
            }
-
 
309
        }
-
 
310
 
-
 
311
    }
247
}
312
}
248
 
313
 
249
foreach ( keys %Repos )
314
foreach ( keys %Repos )
250
{
315
{
251
    @{$Repos{$_}} = sort{ uc($PackageData{$a}{name}) cmp uc($PackageData{$b}{name}) } @{$Repos{$_}};
316
    @{$Repos{$_}} = sort{ uc($PackageData{$a}{name}) cmp uc($PackageData{$b}{name}) } @{$Repos{$_}};
Line 260... Line 325...
260
    @{$Repos{$base}} = () unless ( exists $Repos{$base} );
325
    @{$Repos{$base}} = () unless ( exists $Repos{$base} );
261
}
326
}
262
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
327
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
263
#DebugDumpData("Repos", \%Repos);
328
#DebugDumpData("Repos", \%Repos);
264
 
329
 
265
 
-
 
266
#
330
#
267
#   Create a list of Packages
331
#   Create a list of Packages
268
#
332
#
-
 
333
my $totalPackageCount = 0;
269
{
334
{
270
    my $file = "PackageNames.txt";
335
    my $file = "PackageNames.txt";
271
    my $count = 0;
-
 
272
    Message("Create Package Name List", $file);
336
    Message("Create Package Name List", $file);
273
    open ( my $fh, '>', $file ) || Error ("Cannot open $file", "Error: $!");
337
    open ( my $fh, '>', $file ) || Error ("Cannot open $file", "Error: $!");
274
 
338
 
275
    foreach ( sort {$PackageData{$a}{name} cmp $PackageData{$b}{name} } keys %PackageData )
339
    foreach ( sort {$PackageData{$a}{name} cmp $PackageData{$b}{name} } keys %PackageData )
276
    {
340
    {
277
        print $fh "$PackageData{$_}{name}\n";
341
        print $fh "$PackageData{$_}{name}\n";
278
        $count++;
342
        $totalPackageCount++;
279
 
343
 
280
    }
344
    }
281
    close $fh;
345
    close $fh;
282
    Message("Unique Package Names: $count");
346
    Message("Unique Package Names: $totalPackageCount");
283
#    DebugDumpData("PackageData", \%PackageData);
347
#    DebugDumpData("PackageData", \%PackageData);
284
}
348
}
285
 
349
 
286
#
350
#
287
#   Determine Releases that have multiple versions of a package
351
#   Determine Releases that have multiple versions of a package
Line 367... Line 431...
367
 
431
 
368
        foreach my $pkgid ( sort {$PackageData{$a}{name} cmp $PackageData{$b}{name} } keys %PackageData )
432
        foreach my $pkgid ( sort {$PackageData{$a}{name} cmp $PackageData{$b}{name} } keys %PackageData )
369
        {
433
        {
370
            my $repo = $PackageData{$pkgid}{mappedRepo};
434
            my $repo = $PackageData{$pkgid}{mappedRepo};
371
            my $name = $PackageData{$pkgid}{name};
435
            my $name = $PackageData{$pkgid}{name};
-
 
436
            my $svn = $PackageData{$pkgid}{isSVN} ? 'SVN' : '---';
-
 
437
 
-
 
438
            my $youngest = $PackageData{$pkgid}{youngAge};
-
 
439
            my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || 0;
-
 
440
            my $youngestNonBuildadm = $PackageData{$pkgid}{nonBuildadm} || 0;
-
 
441
 
-
 
442
            $youngest =  int($youngest);
-
 
443
            $youngestNonRipple =  int($youngestNonRipple) || '9999';
-
 
444
            $youngestNonBuildadm = int($youngestNonBuildadm) || '9999';
-
 
445
 
-
 
446
            my $txt = sprintf ("Last:%5d, User:%5d, NonR:%5d, $svn", $youngest, $youngestNonBuildadm, $youngestNonRipple);
-
 
447
           $txt .= sprintf (" :: %40s -repo=%s", $name, $repo );
372
            $fh->WriteLn("'$name' '-repo=$repo'");
448
            $fh->WriteLn($txt);
373
        }
449
        }
374
        $fh->Close();
450
        $fh->Close();
375
    }
451
    }
376
 
452
 
377
    my $file = "cc2svn.repo.dat";
453
    my $file = "cc2svn.repo.dat";
Line 382... Line 458...
382
        "ScmRepoMap", \%Data );
458
        "ScmRepoMap", \%Data );
383
 
459
 
384
    $fh->Close();
460
    $fh->Close();
385
}
461
}
386
 
462
 
387
 
-
 
388
#-------------------------------------------------------------------------------
463
#-------------------------------------------------------------------------------
389
# Function        : generateHTML
464
# Function        : generateHTMLHeader
390
#
465
#
391
# Description     : 
-
 
392
#                   Create per package data
466
# Description     : Create an HTML Header
393
#                   Create a nice HTML file so that it can be hyperlinked
-
 
394
#
467
#
395
# Inputs          : 
468
# Inputs          : $section        - Section tag
396
#
469
#
397
# Returns         : 
470
# Returns         : Handle to use
398
#
471
#
399
 
-
 
400
sub generateHTML
472
sub generateHTMLHeader
401
{
473
{
402
    my @PackageOrder;
474
    my ($section) = @_;
403
    EnvImport('GBE_RM_URL');
-
 
404
    EnvImport('GBE_DM_URL');
-
 
405
    my $t;
475
    my $handle;
406
    Message("Generate HTML");
-
 
407
 
476
 
-
 
477
    Error ("Bad HTML section id: $section") unless ( exists $htmlData{$section} );
-
 
478
    $currentSection = $section;
-
 
479
    my $fname = $htmlData{$section}{file};
-
 
480
    my $title = $htmlData{$section}{title};
-
 
481
    Message("Generating: $title");
408
 
482
 
409
    open (HTML, '>', 'PackageConversion.html') || Error ("Cannot create HTML");
483
    open ($handle, '>', $fname) || Error ("Cannot create HTML: $fname");
410
    print HTML <<'HEADER';
484
    print $handle <<"HEADER";
411
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
485
<!DOCTYPE $handle PUBLIC "-//W3C//DTD $handle 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
412
<html>
486
<html>
413
<head>
487
<head>
414
<title>Package Conversion Details</title>
488
<title>$title</title>
415
<script type="text/javascript">
489
<script type="text/javascript">
416
function click_expandingMenuHeader(obj,sectionName)
490
function click_expandingMenuHeader(obj,sectionName)
417
{ 
491
{ 
418
var x=document.getElementById("cssprop_" + sectionName).parentNode.className;
492
var x=document.getElementById("cssprop_" + sectionName).parentNode.className;
419
if (x.indexOf("expandingMenuNotSelected")>-1)
493
if (x.indexOf("expandingMenuNotSelected")>-1)
Line 511... Line 585...
511
}
585
}
512
</style>
586
</style>
513
</head>
587
</head>
514
 
588
 
515
HEADER
589
HEADER
516
    print HTML "<body>\n";
590
    print $handle "<body>\n";
517
    print HTML "<p>Generated: " . localtime() . "\n";
591
    print $handle "<p>Generated: " . localtime() . "\n";
518
 
592
 
519
    #
593
    #
520
    #   Generate an index
594
    #   Generate an index
521
    #
595
    #
522
    print HTML htmlH1(anchor("Index", 'Index'));
596
    print $handle htmlH1(anchor("Index", 'Index'));
-
 
597
 
523
    print HTML "<dl>";
598
    print $handle "<dl>";
524
#    print HTML "<dd>" . hRef("#BOMIndex"                ,'Included BOM Projects');
599
    foreach my $section ( sort keys %htmlData )
-
 
600
    {
525
    print HTML "<dd>" . hRef("#ReleaseIndex"            ,'Included Releases');
601
        my $fname = $htmlData{$section}{file};
526
    print HTML "<dd>" . hRef("#ReleaseIndexExcluded"    ,'Excluded Releases');
602
        my $title = $htmlData{$section}{title};
-
 
603
        
527
    print HTML "<dd>" . hRef("#CompletePackageIndex"    ,'Complete Package Index');
604
        print $handle "<dd>" . hRef("$fname"            ,$title);
-
 
605
 
-
 
606
    }
-
 
607
    print $handle "</dl>\n";
-
 
608
 
528
    print HTML "<dd>" . hRef("#PackageDetails"          ,'Package Conversion Details');
609
    unless ( $htmlData{$section}{noHeader} )
-
 
610
    {
529
    print HTML "<dd>" . hRef("#BadPackageVersions"      ,'Bad Package Versions');
611
        print $handle htmlH1('<hr>' . $title);
-
 
612
    }
-
 
613
 
-
 
614
    return $handle;
-
 
615
}
-
 
616
 
530
    print HTML "<dd>" . hRef("#BadPackageVersionsByProject",'Bad Package Versions By Project');
617
#-------------------------------------------------------------------------------
531
    print HTML "<dd>" . hRef("#MultiplePackages"        ,'Releases with duplicated packages');
618
# Function        : generateHTMLTail
-
 
619
#
-
 
620
# Description     : 
-
 
621
#
-
 
622
# Inputs          : 
-
 
623
#
-
 
624
# Returns         : 
-
 
625
#
-
 
626
sub generateHTMLTail
-
 
627
{
-
 
628
    my ($handle) = @_;
532
    print HTML "<dd>" . hRef("#RepoIndex"               ,'Repository Index');
629
    print $handle "</body>\n";
-
 
630
    print $handle "</html>\n";
-
 
631
    close $handle;
-
 
632
 
-
 
633
    $currentSection = '';
-
 
634
}
-
 
635
 
-
 
636
 
533
    print HTML "<dd>" . hRef("#RepoMap"                 ,'Repository Mapping');
637
#-------------------------------------------------------------------------------
-
 
638
# Function        : generateHTML
-
 
639
#
-
 
640
# Description     : 
534
    print HTML "<dd>" . hRef("#NotMapped"               ,'Unmapped Packages');
641
#                   Create per package data
535
    print HTML "<dd>" . hRef("#InSvn"                   ,'Packages in Subversion');
642
#                   Create a nice HTML file so that it can be hyperlinked
-
 
643
#
-
 
644
# Inputs          : 
-
 
645
#
-
 
646
# Returns         : 
-
 
647
#
-
 
648
 
-
 
649
sub generateHTML
-
 
650
{
536
    print HTML "</dl>\n";
651
    my @PackageOrder;
-
 
652
    EnvImport('GBE_RM_URL');
-
 
653
    EnvImport('GBE_DM_URL');
-
 
654
    my $t;
-
 
655
    Message("Generate HTML");
-
 
656
    my $HTML = generateHTMLHeader ('S0');
-
 
657
    print $HTML "This page is a simple index into the other pages that contain the Clearcase to Subversion converstion details.\n";
537
 
658
 
538
    #
659
    #
539
    #   BOM Projects
660
    #   BOM Projects
540
    #
661
    #
541
#    {
662
#    {
542
#        print HTML header('BOMIndex', 'Included BOM Projects');
663
#        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";
664
#        print $HTML "BOM Projects included in processing. All branches and and SBOMS scanned for essential packages and versions\n";
544
#
665
#
545
#        print HTML "<dl>\n";
666
#        print $HTML "<dl>\n";
546
#        foreach my $project_id ( sort {$ScmAllBomProjects{$a}{project_name} cmp $ScmAllBomProjects{$b}{project_name} } keys %ScmAllBomProjects )
667
#        foreach my $project_id ( sort {$ScmAllBomProjects{$a}{project_name} cmp $ScmAllBomProjects{$b}{project_name} } keys %ScmAllBomProjects )
547
#        {
668
#        {
548
#            print HTML "<dd>" . linkBomProject($project_id,$ScmAllBomProjects{$project_id}{project_name});
669
#            print $HTML "<dd>" . linkBomProject($project_id,$ScmAllBomProjects{$project_id}{project_name});
549
#        }
670
#        }
550
#        print HTML "</dl>\n";
671
#        print $HTML "</dl>\n";
551
#    }
672
#    }
552
 
673
 
553
    #
674
    #
554
    #   Release List
675
    #   Release List
555
    #
676
    #
556
    my %Projects;
677
    my %Projects;
557
    push @{$Projects{$ScmReleases{$_}{'pName'}}}, $_ foreach ( keys %ScmReleases );
678
    push @{$Projects{$ScmReleases{$_}{'pName'}}}, $_ foreach ( keys %ScmReleases );
558
 
679
 
-
 
680
 
559
    print HTML header('ReleaseIndex', 'Included Releases');
681
    $HTML = generateHTMLHeader ('S1');
560
    print HTML "Releases that will be considered in the conversion process.\n";
682
    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";
683
    print $HTML "<br>Releases are scanned for packages and versions that are used.\n";
562
    print HTML "<dl>\n";
684
    print $HTML "<dl>\n";
563
    foreach ( sort keys %Projects )
685
    foreach ( sort keys %Projects )
564
    {
686
    {
565
        foreach my $rtagid ( sort {$ScmReleases{$a}{name} cmp $ScmReleases{$b}{name}} @{$Projects{$_}} )
687
        foreach my $rtagid ( sort {$ScmReleases{$a}{name} cmp $ScmReleases{$b}{name}} @{$Projects{$_}} )
566
        {
688
        {
567
            next if ( $ScmReleases{$rtagid}{'excluded'} );
689
            next if ( $ScmReleases{$rtagid}{'excluded'} );
568
            print HTML "<dd>" . linkRelease($rtagid);
690
            print $HTML "<dd>" . linkRelease($rtagid);
569
        }
691
        }
570
    }
692
    }
571
    print HTML "</dl>\n";
693
    print $HTML "</dl>\n";
-
 
694
    generateHTMLTail($HTML);
572
 
695
 
-
 
696
 
573
    print HTML header('ReleaseIndexExcluded', 'Excluded Releases');
697
    $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";
698
    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";
699
    print $HTML "<dl>\n";
576
    foreach ( sort keys %Projects )
700
    foreach ( sort keys %Projects )
577
    {
701
    {
578
        foreach my $rtagid ( sort {$ScmReleases{$a}{name} cmp $ScmReleases{$b}{name}} @{$Projects{$_}} )
702
        foreach my $rtagid ( sort {$ScmReleases{$a}{name} cmp $ScmReleases{$b}{name}} @{$Projects{$_}} )
579
        {
703
        {
580
            next unless ( $ScmReleases{$rtagid}{'excluded'} );
704
            next unless ( $ScmReleases{$rtagid}{'excluded'} );
581
            print HTML "<dd>" . linkRelease($rtagid);
705
            print $HTML "<dd>" . linkRelease($rtagid);
582
        }
706
        }
583
    }
707
    }
584
    print HTML "</dl>\n";
708
    print $HTML "</dl>\n";
-
 
709
    generateHTMLTail($HTML);
585
 
710
 
586
 
711
 
587
    my $currentChar = '';
712
    my $currentChar = '';
588
    undef $t;
713
    undef $t;
589
    @PackageOrder = ();
714
    @PackageOrder = ();
590
    print HTML header('CompletePackageIndex', 'Complete Package Index');
715
    $HTML = generateHTMLHeader ('S3');
591
    print HTML "Complete list of packages. This includes 'Essential Packages' and packages that ";
716
    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.";
717
    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>";
718
    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>";
719
    print $HTML "<button type=\"button\" onclick=\"flipStyleByName('.essential', 'display', 'none', '')\" >Show/Hide Essential</button>";
595
    
720
    
596
    foreach my $pkgid ( sort {lc($ScmAllPackages{$a}) cmp lc($ScmAllPackages{$b}) } keys %ScmAllPackages )
721
    foreach my $pkgid ( sort {lc($ScmAllPackages{$a}) cmp lc($ScmAllPackages{$b}) } keys %ScmAllPackages )
597
    {
722
    {
598
        my $thisChar = uc(substr($ScmAllPackages{$pkgid}, 0, 1 ));
723
        my $thisChar = uc(substr($ScmAllPackages{$pkgid}, 0, 1 ));
599
        if ( $thisChar ne $currentChar )
724
        if ( $thisChar ne $currentChar )
600
        {
725
        {
601
            print HTML $t->getTable if ( $t );
726
            print $HTML $t->getTable if ( $t );
602
            $t = new HTML::Table();
727
            $t = new HTML::Table();
603
 
728
 
604
            endExpander() if ($currentChar);
729
            endExpander($HTML) if ($currentChar);
605
            startExpander("Letter2$thisChar", $thisChar);
730
            startExpander($HTML, "Letter2$thisChar", $thisChar);
606
            $currentChar = $thisChar;
731
            $currentChar = $thisChar;
607
        }
732
        }
608
        my $packageRef;
733
        my $packageRef;
609
        my $version_tree = '';
734
        my $version_tree = '';
610
        my $import_log = '';
735
        my $import_log = '';
Line 628... Line 753...
628
            $class = 'essential';
753
            $class = 'essential';
629
        }
754
        }
630
        $t->addRow($packageRef, linkPkg($pkgid, '(Release Manager)'),$version_tree, $import_log, $marker);
755
        $t->addRow($packageRef, linkPkg($pkgid, '(Release Manager)'),$version_tree, $import_log, $marker);
631
        $t->setRowClass  (-1, $class);
756
        $t->setRowClass  (-1, $class);
632
    }
757
    }
633
    print HTML $t->getTable if ( $t );
758
    print $HTML $t->getTable if ( $t );
634
    endExpander() if ($currentChar);
759
    endExpander($HTML) if ($currentChar);
-
 
760
    generateHTMLTail($HTML);
635
 
761
 
636
    #
762
    #
637
    #   Package Details
763
    #   Package Details
638
    #
764
    #
639
    print HTML header('PackageDetails', 'Package Conversion Details');
765
    $HTML = generateHTMLHeader ('S4');
640
    $t = new HTML::Table( -border=>1 );
766
    $t = new HTML::Table( -border=>1 );
641
    foreach my $pkgid ( @PackageOrder )
767
    foreach my $pkgid ( @PackageOrder )
642
    {
768
    {
643
        my @badVobs;
769
        my @badVobs;
644
        $t->addRow('&nbsp;');
770
        $t->addRow('&nbsp;');
645
        $t->setRowClass  (-1, 'packageTitle');
771
        $t->setRowClass  (-1, 'packageTitle');
646
        $t->setCellColSpan(-1, 1, 2);
772
        $t->setCellColSpan(-1, 1, 2);
647
        
773
        
648
        $t->addRow( anchor("Package_$PackageData{$pkgid}{name}", 'Name:'), linkPkg($pkgid) . linkImage($pkgid, ' (Version Tree)') . linkImportLog( $pkgid, ' (Import Log)' ) );
774
        $t->addRow( anchor("$PackageData{$pkgid}{name}", 'Name:'), linkPkg($pkgid) . linkImage($pkgid, ' (Version Tree)') . linkImportLog( $pkgid, ' (Import Log)' ) );
649
#        $t->setRowHead(-1,1);
775
#        $t->setRowHead(-1,1);
650
        
776
        
651
        my $t2 = new HTML::Table( -border=>0, -padding=>0, -spacing=>0 );
777
        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}} )
778
        foreach my $pvid ( sort {$ScmPackages{$a}{fullVersion} cmp $ScmPackages{$b}{fullVersion} } @{$PackageSet{$pkgid}} )
653
        {
779
        {
Line 668... Line 794...
668
        $t->addRow("Versions used:", $t2->getTable);
794
        $t->addRow("Versions used:", $t2->getTable);
669
        $t->addRow("Type:", $PackageData{$pkgid}{type});
795
        $t->addRow("Type:", $PackageData{$pkgid}{type});
670
        $t->addRow("Projects:",join (',', @{$PackageData{$pkgid}{suffixes}} ));
796
        $t->addRow("Projects:",join (',', @{$PackageData{$pkgid}{suffixes}} ));
671
 
797
 
672
        my $youngest = $PackageData{$pkgid}{youngAge};
798
        my $youngest = $PackageData{$pkgid}{youngAge};
673
        my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || $youngest;
799
        my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || 0;
-
 
800
        my $youngestNonBuildadm = $PackageData{$pkgid}{nonBuildadm} || 0;
-
 
801
 
-
 
802
        $youngest = int($youngest);
-
 
803
        $youngestNonRipple = int($youngestNonRipple) || '-';
-
 
804
        $youngestNonBuildadm = int($youngestNonBuildadm) || '-';
-
 
805
 
674
        $t->addRow("Youngest:", int($youngestNonRipple) . " Days (NonRipple). " . int($youngest) . " Days (Any)" );
806
        $t->addRow("Youngest:", "$youngestNonRipple Days (NonRipple). $youngestNonBuildadm Days (NonBuildadm). $youngest Days (any Build)" );
675
        $t->addRow("Views:", join (',', keys %{$PackageData{$pkgid}{view}}));
807
        $t->addRow("Views:", join (',', keys %{$PackageData{$pkgid}{view}}));
676
 
808
 
677
        if ( $PackageData{$pkgid}{MultiVob} )
809
        if ( $PackageData{$pkgid}{MultiVob} )
678
        {
810
        {
679
            my $t2 = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
811
            my $t2 = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
Line 726... Line 858...
726
            }
858
            }
727
            $t->addRow("Bad VCS:", $t2->getTable );
859
            $t->addRow("Bad VCS:", $t2->getTable );
728
        }
860
        }
729
 
861
 
730
        my $repo = $PackageData{$pkgid}{mappedRepo};
862
        my $repo = $PackageData{$pkgid}{mappedRepo};
-
 
863
        my %RepoList;
-
 
864
        foreach my $pvid ( @{$PackageSet{$pkgid}} )
-
 
865
        {
-
 
866
            my $repo = $ScmPackages{$pvid}{'vcstag'};
-
 
867
            if ( $repo =~ m~SVN::(.*)(/tags/|/branches/|/trunk)~i )
-
 
868
            {
-
 
869
                $RepoList{$1} = svnLink($1) unless exists $RepoList{$1};
-
 
870
            }
-
 
871
        }
-
 
872
        my $txt = join( '<br>', values %RepoList);
-
 
873
        $txt = ' : ' . $txt if ( $txt );
731
        $t->addRow("Repo:", hRef("#Repo_$repo", $repo) );
874
        $t->addRow("Repo:", hRef("#Repo_$repo", $repo). $txt );
732
    }
875
    }
733
    $t->setColClass (1, 'listTitle' );
876
    $t->setColClass (1, 'listTitle' );
734
    print HTML $t->getTable;
877
    print $HTML $t->getTable;
-
 
878
    generateHTMLTail($HTML);
735
    #
879
    #
736
    #   Bad Package information
880
    #   Bad Package information
737
    #
881
    #
738
Message("Bad Package Versions");
-
 
739
    my %BadByProject;
882
    my %BadByProject;
740
    my $last_proj_id = 0;
883
    my $last_proj_id = 0;
741
 
884
 
742
    print HTML header('BadPackageVersions', 'Bad Package Versions');
885
    $HTML = generateHTMLHeader ('S5');
743
    print HTML "These package-versions cannot be reproduced from ClearCase. This may be due to\n";
886
    print $HTML "These package-versions cannot be reproduced from ClearCase. This may be due to\n";
744
    print HTML "<dl><dd>Invalid Release Manager information";
887
    print $HTML "<dl><dd>Invalid Release Manager information";
745
    print HTML "<dd>Incorrect Release Manager Data";
888
    print $HTML "<dd>Incorrect Release Manager Data";
746
    print HTML "<dd>ClearCase label and Path do not result in a view with files";
889
    print $HTML "<dd>ClearCase label and Path do not result in a view with files";
747
    print HTML "</dl>";
890
    print $HTML "</dl>";
748
    $t = new HTML::Table( -border=>1 );
891
    $t = new HTML::Table( -border=>1 );
749
    $t->addRow( 'Package Version','VCS Tag' );
892
    $t->addRow( 'Package Version','VCS Tag' );
750
    $t->setRowHead(1,1);
893
    $t->setRowHead(1,1);
751
    foreach my $pvid ( sort {lc($ScmPackages{$a}{name}) cmp lc($ScmPackages{$b}{name}) } keys %ScmPackages )
894
    foreach my $pvid ( sort {lc($ScmPackages{$a}{name}) cmp lc($ScmPackages{$b}{name}) } keys %ScmPackages )
752
    {
895
    {
Line 767... Line 910...
767
        {
910
        {
768
            $t2->addRow("Used Indirectly by:");
911
            $t2->addRow("Used Indirectly by:");
769
            $t2->addRow(linkRelease($_, $pvid)) foreach ( @$iusers );
912
            $t2->addRow(linkRelease($_, $pvid)) foreach ( @$iusers );
770
            push @{$BadByProject{$_}{indirect}}, $pvid foreach ( @$iusers );
913
            push @{$BadByProject{$_}{indirect}}, $pvid foreach ( @$iusers );
771
        }
914
        }
772
        $t->addRow( anchor("BadVcs_$pvid",linkPvid($pvid)), $t2->getTable );
915
        $t->addRow( anchor("$pvid",linkPvid($pvid)), $t2->getTable );
773
    }
916
    }
774
    $t->setColClass (1, 'listTitle' );
917
    $t->setColClass (1, 'listTitle' );
775
    print HTML $t->getTable;
918
    print $HTML $t->getTable;
-
 
919
    generateHTMLTail($HTML);
776
 
920
 
777
    #
921
    #
778
    #   Bad package vesrions by project
922
    #   Bad package vesrions by project
779
    #
923
    #
780
Message("Bad Package Versions by Project");
924
    $HTML = generateHTMLHeader ('S6');
781
    print HTML header('BadPackageVersionsByProject', 'Bad Package Versions By Project');
-
 
782
    $t = new HTML::Table( -border=>1 );
925
    $t = new HTML::Table( -border=>1 );
783
    $t->addRow( 'Release','Package');
926
    $t->addRow( 'Release','Package');
784
    $t->setRowHead(1,1);
927
    $t->setRowHead(1,1);
785
    $last_proj_id = 0;
928
    $last_proj_id = 0;
786
 
929
 
Line 825... Line 968...
825
        $t->addRow(linkRelease($rtag_id, undef, 1), $t2->getTable  );
968
        $t->addRow(linkRelease($rtag_id, undef, 1), $t2->getTable  );
826
    }
969
    }
827
 
970
 
828
    $t->setColClass (1, 'listTitle' );
971
    $t->setColClass (1, 'listTitle' );
829
    $t->setColHead(1,1);
972
    $t->setColHead(1,1);
830
    print HTML $t->getTable;
973
    print $HTML $t->getTable;
831
 
-
 
832
Message("Repo Index");
-
 
833
    print HTML header('RepoIndex', 'Repository Index');
-
 
834
    print HTML "A summary of proposed Repostories and Paths\n";
-
 
835
 
-
 
836
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
-
 
837
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
-
 
838
    $t->setCellColSpan(1, 1, 2);
-
 
839
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %RepoSubIndex )
-
 
840
    {
-
 
841
            next if ( $repo eq 'UNKNOWN' );
-
 
842
            next if ( $repo eq 'SVN' );
-
 
843
            my $count = '';
-
 
844
            if ( exists $RepoSubIndex{$repo}{'-'}   )
-
 
845
            {
-
 
846
                $count = @{$RepoSubIndex{$repo}{'-'}};
-
 
847
            }
-
 
848
            $t->addRow( hRef("#Repo_$repo", $repo), '', $count  );
-
 
849
            $t->setCellColSpan($t->getTableRows(), 1, 2);
-
 
850
 
-
 
851
            foreach my $path ( sort {uc($a) cmp uc($b) } keys %{$RepoSubIndex{$repo}} )
-
 
852
            {
-
 
853
                    next if ( $path eq '-' );
-
 
854
                    my $depth = $path =~ tr~/~~;
-
 
855
                    my $warn = ($depth > 2) ? ' - Deeply nested' : '';
-
 
856
                    my $count = (@{$RepoSubIndex{$repo}{$path}});
-
 
857
                    $warn .= ' - Only One Package' if ( $count < 2 );
-
 
858
 
-
 
859
                    $t->addRow( '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', hRef("#Repo_$repo/$path", $path), $count, $warn);
-
 
860
            }
-
 
861
 
-
 
862
    }
-
 
863
    
-
 
864
    print HTML $t->getTable;
974
    generateHTMLTail($HTML);
865
 
975
 
866
    #
976
    #
867
    #   Releases that have multiple instances of the same package in them
977
    #   Releases that have multiple instances of the same package in them
868
    #
978
    #
869
Message("Multiple Packages");
979
    $HTML = generateHTMLHeader ('S7');
870
    print HTML header('MultiplePackages', 'Releases with duplicated packages');
-
 
871
    print HTML "Releases that have multiple instances of the same package\n";
980
    print $HTML "Releases that have multiple instances of the same package\n";
872
#DebugDumpData("ReleasePackages", \%ReleasePackages );
981
#DebugDumpData("ReleasePackages", \%ReleasePackages );
873
 
982
 
874
    $t = new HTML::Table( -border=>1 );
983
    $t = new HTML::Table( -border=>1 );
875
    $t->addRow( 'Release','Package');
984
    $t->addRow( 'Release','Package');
876
    $t->setRowHead(1,1);
985
    $t->setRowHead(1,1);
Line 909... Line 1018...
909
 
1018
 
910
        $t->addRow(linkRelease($rtag_id, undef, 1), $t2->getTable  );
1019
        $t->addRow(linkRelease($rtag_id, undef, 1), $t2->getTable  );
911
    }
1020
    }
912
    $t->setColClass (1, 'listTitle' );
1021
    $t->setColClass (1, 'listTitle' );
913
    $t->setColHead(1,1);
1022
    $t->setColHead(1,1);
914
    print HTML $t->getTable;
1023
    print $HTML $t->getTable;
-
 
1024
    generateHTMLTail($HTML);
915
    
1025
    
916
 
1026
 
917
Message("Repo Index");
-
 
918
    print HTML header('RepoIndex', 'Repository Index');
1027
    $HTML = generateHTMLHeader ('S8');
919
    print HTML "A summary of proposed Repostories and Paths\n";
1028
    print $HTML "A summary of proposed Repostories and Paths\n";
920
 
1029
 
921
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
1030
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
922
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
1031
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
923
    $t->setCellColSpan(1, 1, 2);
1032
    $t->setCellColSpan(1, 1, 2);
924
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %RepoSubIndex )
1033
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %RepoSubIndex )
Line 944... Line 1053...
944
                    $t->addRow( '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', hRef("#Repo_$repo/$path", $path), $count, $warn);
1053
                    $t->addRow( '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', hRef("#Repo_$repo/$path", $path), $count, $warn);
945
            }
1054
            }
946
 
1055
 
947
    }
1056
    }
948
    
1057
    
949
    print HTML $t->getTable;
1058
    print $HTML $t->getTable;
-
 
1059
    generateHTMLTail($HTML);
950
 
1060
 
951
 
1061
 
952
 
1062
 
953
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
1063
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
954
#DebugDumpData("Repos", \%Repos);
1064
#DebugDumpData("Repos", \%Repos);
955
    
1065
    
956
    #
1066
    #
957
    #   Repo back reference
1067
    #   Repo back reference
958
    #
1068
    #
959
Message("Repo Map");
-
 
960
    print HTML header('RepoMap', 'Repository Mapping');
1069
    $HTML = generateHTMLHeader ('S9');
961
    print HTML "Proposed Repostories and Paths with package mapping and ClearCase Path\n";
1070
    print $HTML "Proposed and Converted Repostories and Paths with package mapping and ClearCase Path\n";
962
 
1071
 
963
    $t = new HTML::Table( -border=>1 );
1072
    $t = new HTML::Table( -border=>1 );
964
    $t->addRow( 'Repository Path', 'Package Name and Original Vob Path(s)' );
1073
    $t->addRow( 'Repository Path', 'Package Name,Original Vob Path(s),Last Build NonBuildadm [ANY]' );
965
 
1074
 
966
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %Repos )
1075
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %Repos )
967
    {
1076
    {
968
        next if ( $repo eq 'SVN' );
1077
        next if ( $repo eq 'SVN' );
969
        next if ( $repo eq 'UNKNOWN' );
1078
        next if ( $repo eq 'UNKNOWN' );
Line 973... Line 1082...
973
        foreach my $pkgid ( @{$Repos{$repo}} )
1082
        foreach my $pkgid ( @{$Repos{$repo}} )
974
        {
1083
        {
975
            my $t2 = new HTML::Table( -border=>0,-padding=>0, -spacing=>0, -class=>'paddedTable' );
1084
            my $t2 = new HTML::Table( -border=>0,-padding=>0, -spacing=>0, -class=>'paddedTable' );
976
            foreach my $vob ( keys %{$PackageData{$pkgid}{vobPath}} )
1085
            foreach my $vob ( keys %{$PackageData{$pkgid}{vobPath}} )
977
            {
1086
            {
-
 
1087
                    if ($PackageData{$pkgid}{isSVN} && $vob !~ m~^/~ )
-
 
1088
                    {
-
 
1089
                        $vob = svnLink($vob);
-
 
1090
                        #$vob = "<span style=\"background-color:#B1FB17\">$vob</span>";
-
 
1091
                    }
978
                    $t2->addRow( $vob );
1092
                    $t2->addRow( $vob );
979
            }
1093
            }
-
 
1094
            my $t2Text = '';
980
            if ( $t2->getTableRows() )
1095
            if ( $t2->getTableRows() )
981
            {
1096
            {
982
                $t2->setColClass (1, 'listTitle' );
1097
                $t2->setColClass (1, 'listTitle' );
-
 
1098
                $t2Text = $t2->getTable();
983
            }
1099
            }
-
 
1100
            my $youngest = $PackageData{$pkgid}{youngAge};
-
 
1101
            my $youngestNonRipple = $PackageData{$pkgid}{youngAgeNonRipple} || 0;
-
 
1102
            my $youngestNonBuildadm = $PackageData{$pkgid}{nonBuildadm} || 0;
-
 
1103
 
-
 
1104
            $youngest =  int($youngest);
-
 
1105
            $youngestNonRipple =  int($youngestNonRipple) || '-';
-
 
1106
            $youngestNonBuildadm = int($youngestNonBuildadm) || '-';
-
 
1107
            
984
            $t1->addRow( linkPackageDetails($pkgid), $t2->getTable() );
1108
            $t1->addRow( linkPackageDetails($pkgid), $t2Text, "$youngestNonBuildadm [$youngest]"  );
985
        }
1109
        }
-
 
1110
 
986
        if ( $t1->getTableRows() )
1111
        if ( $t1->getTableRows() )
987
        {
1112
        {
988
            $t1->setColWidth(1,'30%');
1113
            $t1->setColWidth(1,'30%');
989
            $t1->setColClass (1, 'listTitle' );
1114
            $t1->setColClass (1, 'listTitle' );
-
 
1115
            $t1->setColWidth(3,'10%');
990
        }
1116
        }
991
        $t->addRow( anchor("Repo_$repo",$repo), $t1->getTable() );
1117
        $t->addRow( anchor("$repo",$repo), $t1->getTable() );
992
 
1118
 
993
    }
1119
    }
994
    $t->setColClass (1, 'listTitle' );
1120
    $t->setColClass (1, 'listTitle' );
995
    $t->setColHead(1,1);
1121
    $t->setColHead(1,1);
996
    print HTML $t->getTable;
1122
    print $HTML $t->getTable;
-
 
1123
    generateHTMLTail($HTML);
997
    
1124
    
998
    #
1125
    #
999
    #   Highlight packages that have not been mapped to a Repo
1126
    #   Highlight packages that have not been mapped to a Repo
1000
    #
1127
    #
1001
Message("Not Mapped");
-
 
1002
    print HTML header('NotMapped', 'Unmapped Packages');
1128
    $HTML = generateHTMLHeader ('SA');
1003
    print HTML "Packages that have not been mapped to a Repository\n";
1129
    print $HTML "Packages that have not been mapped to a Repository\n";
1004
    $t = new HTML::Table( -border=>1 );
1130
    $t = new HTML::Table( -border=>1 );
1005
    foreach my $pkgid ( @{$Repos{UNKNOWN}} )
1131
    foreach my $pkgid ( @{$Repos{UNKNOWN}} )
1006
    {
1132
    {
1007
        my $flag_badCC;
1133
        my $flag_badCC;
1008
        my $flag_multi;
1134
        my $flag_multi;
Line 1024... Line 1150...
1024
        push @data, "Bad VcsTag" if $flag_badVob;
1150
        push @data, "Bad VcsTag" if $flag_badVob;
1025
        $t->addRow( linkPackageDetails($pkgid), join( '<br>', @data) );
1151
        $t->addRow( linkPackageDetails($pkgid), join( '<br>', @data) );
1026
    }
1152
    }
1027
    
1153
    
1028
    $t->setColClass (1, 'listTitle' );
1154
    $t->setColClass (1, 'listTitle' );
1029
    print HTML $t->getTable;
1155
    print $HTML $t->getTable;
-
 
1156
    generateHTMLTail($HTML);
1030
    
1157
 
1031
    #
1158
    #
1032
    #   Packages already under Subversion
1159
    #   Packages already under Subversion
1033
    #
1160
    #
1034
Message("In Subversion");
1161
    $HTML = generateHTMLHeader ('SB');
1035
    print HTML header('InSvn', 'Packages in Subversion');
1162
    print $HTML "Packages that are currently in Subversion\n";
-
 
1163
    print $HTML "<br>Packages in Subversion   : ". scalar @{$Repos{SVN}} ."\n";
1036
    print HTML "Packages that are currently in Subversion\n";
1164
    print $HTML "<br>Total Packages to convert: ". $totalPackageCount ."\n";
1037
    print HTML anchor("Repo_SVN",'SVN');
1165
    print $HTML "<p>" ,anchor("SVN",'SVN');
1038
 
1166
 
1039
    $t = new HTML::Table( -border=>1 );
1167
    $t = new HTML::Table( -border=>1 );
1040
    foreach my $pkgid ( @{$Repos{SVN}} )
1168
    foreach my $pkgid ( @{$Repos{SVN}} )
1041
    {
1169
    {
1042
        my %RepoList;
1170
        my %RepoList;
Line 1048... Line 1176...
1048
                $RepoList{$1} = svnLink($1) unless exists $RepoList{$1};
1176
                $RepoList{$1} = svnLink($1) unless exists $RepoList{$1};
1049
            }
1177
            }
1050
        }
1178
        }
1051
        $t->addRow( linkPackageDetails($pkgid), join( '<br>', values %RepoList) );
1179
        $t->addRow( linkPackageDetails($pkgid), join( '<br>', values %RepoList) );
1052
    }
1180
    }
1053
    print HTML $t->getTable;
1181
    print $HTML $t->getTable;
1054
 
1182
 
1055
print HTML "</body>\n";
-
 
1056
print HTML "</html>\n";
1183
    generateHTMLTail($HTML);
1057
close HTML;
-
 
1058
Message ("Created: PackageConversion.html");
1184
Message ("Created: PackageConversion.html");
1059
 
-
 
1060
#DebugDumpData("PackageData",\%PackageData );
-
 
1061
#DebugDumpData("Views", \%Views );
-
 
1062
#DebugDumpData("Vobs", \%Vobs );
-
 
1063
#DebugDumpData("Repos", \%Repos );
-
 
1064
 
-
 
1065
    #
-
 
1066
    #   Generate VOB XREF too
-
 
1067
    #
-
 
1068
    open (HTML, '>', 'RepoMap.html') || Error ("Cannot create HTML");
-
 
1069
    print HTML <<'HEADER';
-
 
1070
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
-
 
1071
<html>
-
 
1072
<head>
-
 
1073
<title>Repository Mapping</title>
-
 
1074
<style TYPE="text/css">
-
 
1075
.packageTitle {
-
 
1076
    background-color:#FFFF99;
-
 
1077
}
1185
}
1078
 
1186
 
1079
.listTitle {
-
 
1080
    text-align:left;
-
 
1081
    vertical-align:top;
-
 
1082
}
-
 
1083
 
-
 
1084
.paddedTable {
-
 
1085
    border-spacing: 10px 0px;
-
 
1086
}
-
 
1087
</style>
1187
sub hRef
1088
</head>
-
 
1089
 
-
 
1090
HEADER
-
 
1091
    print HTML "<body>\n";
-
 
1092
    print HTML htmlH1('Clearcase VOB to Subversion Repository mapping');
-
 
1093
    print HTML "<p>Generated: " . localtime() . "\n";
-
 
1094
 
-
 
1095
    #
-
 
1096
    #   Generate an index
-
 
1097
    #
-
 
1098
    print HTML htmlH1(anchor("Index", 'Index'));
-
 
1099
    print HTML "<dl>";
-
 
1100
    print HTML "<dd>" . hRef("#RepoIndex"               ,'Repository Index');
-
 
1101
    print HTML "<dd>" . hRef("#RepoMap"                 ,'Repository Mapping');
-
 
1102
    print HTML "<dd>" . hRef("#NotMapped"               ,'Unmapped Packages');
-
 
1103
    print HTML "</dl>\n";
-
 
1104
 
-
 
1105
 
-
 
1106
    print HTML header('RepoIndex', 'Repository Index');
-
 
1107
    print HTML "A summary of proposed Repostories and Paths\n";
-
 
1108
#DebugDumpData("RepoSubIndex", \%RepoSubIndex );
-
 
1109
#DebugDumpData("Repos", \%Repos );
-
 
1110
 
-
 
1111
 
1188
{
1112
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
-
 
1113
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
-
 
1114
    $t->setCellColSpan(1, 1, 2);
-
 
1115
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %RepoSubIndex )
-
 
1116
    {
-
 
1117
            next if ( $repo eq 'UNKNOWN' );
-
 
1118
            next if ( $repo eq 'SVN' );
1189
    my ($url, $text, $target) = @_;
1119
            my $count = '';
1190
    my $ttext = '';
1120
            if ( exists $RepoSubIndex{$repo}{'-'}   )
-
 
1121
            {
-
 
1122
                $count = @{$RepoSubIndex{$repo}{'-'}};
-
 
1123
            }
-
 
1124
            $t->addRow( hRef("#Repo_$repo", $repo), '', $count  );
-
 
1125
            $t->setCellColSpan($t->getTableRows(), 1, 2);
-
 
1126
 
-
 
1127
#            delete $RepoSubIndex{$repo}{'-'};
-
 
1128
 
-
 
1129
            foreach my $path ( sort {uc($a) cmp uc($b) } keys %{$RepoSubIndex{$repo}} )
-
 
1130
            {
-
 
1131
                    next if ( $path eq '-' );
-
 
1132
                    my $depth = $path =~ tr~/~~;
-
 
1133
                    my $warn = ($depth > 2) ? ' - Deeply nested' : '';
-
 
1134
                    my $count = (@{$RepoSubIndex{$repo}{$path}});
-
 
1135
                    $warn .= ' - Only One Package' if ( $count < 2 );
-
 
1136
 
-
 
1137
                    $t->addRow( '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', hRef("#Repo_$repo/$path", $path), $count, $warn);
-
 
1138
            }
-
 
1139
 
-
 
1140
    }
-
 
1141
    
-
 
1142
    print HTML $t->getTable;
-
 
1143
    
-
 
1144
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
-
 
1145
#DebugDumpData("Repos", \%Repos);
-
 
1146
    
-
 
1147
    #
-
 
1148
    #   Repo back reference
-
 
1149
    #
-
 
1150
    print HTML header('RepoMap', 'Repository Mapping');
-
 
1151
    print HTML "Proposed Repostories and Paths with package mapping and ClearCase Path\n";
-
 
1152
 
1191
 
1153
    $t = new HTML::Table( -border=>1 );
1192
    if ( $url =~ m~^#(.*?)_~ )
1154
    $t->addRow( 'Repository Path', 'Package Name and Original Vob Path(s)' );
-
 
1155
    
-
 
1156
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %Repos )
-
 
1157
    {
1193
    {
1158
        next if ( $repo eq 'SVN' );
-
 
1159
        next if ( $repo eq 'UNKNOWN' );
-
 
1160
        my @data;
1194
        my $tag = $1;
1161
        my $t1 = new HTML::Table( -border=>1,-width=>'100%', -style=>"border-collapse:collapse" );
-
 
1162
        
-
 
1163
        foreach my $pkgid ( @{$Repos{$repo}} )
1195
        foreach my $section ( keys %htmlData )
1164
        {
1196
        {
1165
            my $t2 = new HTML::Table(-border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
-
 
1166
            foreach my $vob ( keys %{$PackageData{$pkgid}{vobPath}} )
-
 
1167
            {
-
 
1168
                    $t2->addRow( $vob );
-
 
1169
            }
-
 
1170
            if ( $t2->getTableRows() )
1197
            if ( $htmlData{$section}{tag} eq $1 )
1171
            {
1198
            {
-
 
1199
                $url = $htmlData{$section}{file} . $url;
1172
                $t2->setColClass (1, 'listTitle' );
1200
                $target = '_Page'.$section unless ( $target );
1173
            }
1201
            }
1174
            $t1->addRow( linkPkg($pkgid), $t2->getTable() );
-
 
1175
        }
1202
        }
1176
        if ( $t1->getTableRows() )
-
 
1177
        {
-
 
1178
            $t1->setColWidth(1,'30%');
-
 
1179
            $t1->setColClass (1, 'listTitle' );
-
 
1180
        }
-
 
1181
        $t->addRow( anchor("Repo_$repo",$repo), $t1->getTable() );
-
 
1182
 
-
 
1183
    }
1203
    }
1184
    $t->setColClass (1, 'listTitle' );
-
 
1185
    $t->setColHead(1,1);
-
 
1186
    print HTML $t->getTable;
-
 
1187
    
-
 
1188
    #
-
 
1189
    #   Highlight packages that have not been mapped to a Repo
-
 
1190
    #
-
 
1191
    print HTML header('NotMapped', 'Unmapped Packages');
-
 
1192
    print HTML "Packages that have not been mapped to a Repository\n";
-
 
1193
    $t = new HTML::Table( -border=>1 );
-
 
1194
    foreach my $pkgid ( @{$Repos{UNKNOWN}} )
-
 
1195
    {
-
 
1196
        my $flag_badCC;
-
 
1197
        my $flag_multi;
-
 
1198
        my $flag_badVob;
-
 
1199
 
-
 
1200
        $flag_multi  = 1 if $PackageData{$pkgid}{MultiVob};
-
 
1201
        $flag_badVob = 1 if $PackageData{$pkgid}{BadVob};
-
 
1202
 
-
 
1203
        foreach my $pvid ( @{$PackageSet{$pkgid}} )
-
 
1204
        {
-
 
1205
            $flag_badCC  = 1 if ( $ScmPackages{$pvid}{BadCCView} );
-
 
1206
            $flag_multi  = 1 if ( $ScmPackages{$pvid}{MultiVob} );
-
 
1207
            $flag_badVob = 1 if ( $ScmPackages{$pvid}{BadVob} );
-
 
1208
        }
-
 
1209
 
-
 
1210
        my @data;
-
 
1211
        push @data, "Bad ClearCase View" if $flag_badCC;
-
 
1212
        push @data, "Multiple Vobs" if $flag_multi;
-
 
1213
        push @data, "Bad VcsTag" if $flag_badVob;
-
 
1214
        $t->addRow( linkPkg($pkgid), join( '<br>', @data) );
-
 
1215
    }
-
 
1216
    
-
 
1217
    $t->setColClass (1, 'listTitle' );
-
 
1218
    print HTML $t->getTable;
-
 
1219
    
-
 
1220
    print HTML "</body>\n";
-
 
1221
    print HTML "</html>\n";
-
 
1222
    close HTML;
-
 
1223
    Message ("Created: RepoMap.html");
-
 
1224
    
-
 
1225
}
-
 
1226
 
1204
 
1227
sub hRef
-
 
1228
{
-
 
1229
    my ($url, $text, $target) = @_;
-
 
1230
    my $ttext = '';
-
 
1231
    $ttext = ' TARGET="' . $target . '"' if ( defined $target );
1205
    $ttext = ' TARGET="' . $target . '"' if ( defined $target );
1232
    return ( '<a href="' . $url . '"' . $ttext . '>' . $text . '</a>' );
1206
    return ( '<a href="' . $url . '"' . $ttext . '>' . $text . '</a>' );
1233
}
1207
}
1234
 
1208
 
1235
sub anchor
1209
sub anchor
1236
{
1210
{
1237
    my ($name, $text) = @_;
1211
    my ($name, $text) = @_;
-
 
1212
    my $prefix = '';
-
 
1213
    if ( $currentSection )
-
 
1214
    {
-
 
1215
        $prefix = $htmlData{$currentSection}{tag};
-
 
1216
        $prefix = $prefix . '_' if ( $prefix );
-
 
1217
    }
1238
    return ( '<a name="' . $name . '">' . $text . '</a>' );
1218
    return ( '<a name="' . $prefix . $name . '">' . $text . '</a>' );
1239
}
1219
}
1240
 
1220
 
1241
 
1221
 
1242
sub htmlH1
1222
sub htmlH1
1243
{
1223
{
1244
    my ($text) = @_;
1224
    my ($text) = @_;
1245
    return '<h1>' . $text . '</h1>';
1225
    return '<h1>' . $text . '</h1>';
1246
}
1226
}
1247
 
1227
 
1248
my $headerCount = 0;
-
 
1249
sub header
-
 
1250
{
-
 
1251
    my ($name, $text) = @_;
-
 
1252
    $headerCount++;
-
 
1253
    return htmlH1('<hr>'
-
 
1254
                . anchor($name, $text)
-
 
1255
                . anchor("Section_" . $headerCount, '')
-
 
1256
                . hRef("#Index"                        ,'<sup><font size="2"> [Top]</font></sup>')
-
 
1257
                . hRef("#Section_" . ($headerCount - 1),'<sup><font size="2"> [Prev]</font></sup>')
-
 
1258
                . hRef("#Section_" . ($headerCount + 1),'<sup><font size="2"> [Next]</font></sup>')
-
 
1259
                );
-
 
1260
}
-
 
1261
 
-
 
1262
sub linkBomProject
1228
sub linkBomProject
1263
{
1229
{
1264
    my ($projId, $text) = @_;
1230
    my ($projId, $text) = @_;
1265
    my $ref = $GBE_DM_URL . "/Default.asp?proj_id=$projId";
1231
    my $ref = $GBE_DM_URL . "/Default.asp?proj_id=$projId";
1266
 
1232
 
Line 1357... Line 1323...
1357
#
1323
#
1358
# Returns         : 
1324
# Returns         : 
1359
#
1325
#
1360
sub startExpander
1326
sub startExpander
1361
{
1327
{
1362
    my ($name, $text) = @_;
1328
    my ($HTML, $name, $text) = @_;
1363
    print HTML <<EXPANDER;
1329
    print $HTML <<EXPANDER;
1364
<div class="expandingMenu expandingMenuNotSelected">
1330
<div class="expandingMenu expandingMenuNotSelected">
1365
    <div onclick='click_expandingMenuHeader(this,"$name")' class="expandingMenuHeader" >$text</div>
1331
    <div onclick='click_expandingMenuHeader(this,"$name")' class="expandingMenuHeader" >$text</div>
1366
	<div id="cssprop_$name" class="expandingMenuGroup" style="display:none;">
1332
	<div id="cssprop_$name" class="expandingMenuGroup" style="display:none;">
1367
EXPANDER
1333
EXPANDER
1368
}
1334
}
1369
 
1335
 
1370
sub endExpander
1336
sub endExpander
1371
{
1337
{
-
 
1338
    my ($HTML) = @_;
1372
    print HTML "</div></div>\n";
1339
    print $HTML "</div></div>\n";
1373
}
1340
}
1374
 
1341
 
1375
 
1342
 
1376
#    if ( 0 )
1343
#    if ( 0 )
1377
#    {
1344
#    {
Line 1501... Line 1468...
1501
 
1468
 
1502
        'AtmelHAL'                              => 'MASS_Dev_Crypto',
1469
        'AtmelHAL'                              => 'MASS_Dev_Crypto',
1503
        'Netbula'                               => 'COTS',
1470
        'Netbula'                               => 'COTS',
1504
        'ObjectiveGrid'                         => 'COTS',
1471
        'ObjectiveGrid'                         => 'COTS',
1505
        'lmos'                                  => 'DPG_SWBase',
1472
        'lmos'                                  => 'DPG_SWBase',
-
 
1473
#        'daf_cd_transap'                        => 'DPG_SWBase',
1506
        'basetypes'                             => 'MASS_Dev_Infra',
1474
        'basetypes'                             => 'MASS_Dev_Infra',
1507
        'accesscontrol_ejb-api'                 => 'MASS_Dev_Infra/security',
1475
        'accesscontrol_ejb-api'                 => 'MASS_Dev_Infra/Security',
1508
        'tp5000_MUG'                            => 'MREF_Package',
1476
        'tp5000_MUG'                            => 'MREF_Package',
1509
        'udman'                                 => 'MASS_Dev_Infra',
1477
        'udman'                                 => 'MASS_Dev_Infra',
1510
        'emvud'                                 => 'DPG_SWBase/emvud',
1478
        'emvud'                                 => 'DPG_SWBase/emvud',
1511
        'daf_mmi_ti'                            => 'DPG_SWBase',
1479
        'daf_mmi_ti'                            => 'DPG_SWBase',
1512
        'mos_api'                               => 'MOS',
1480
        'mos_api'                               => 'MOS',
Line 1515... Line 1483...
1515
 
1483
 
1516
        'jboss_config'                          => 'MASS_Dev_Bus/Business' ,
1484
        'jboss_config'                          => 'MASS_Dev_Bus/Business' ,
1517
        'jboss_service'                         => 'MASS_Dev_Bus/Business' ,
1485
        'jboss_service'                         => 'MASS_Dev_Bus/Business' ,
1518
        'pgres'                                 => 'ITSO_TRACS/DataManagement' ,
1486
        'pgres'                                 => 'ITSO_TRACS/DataManagement' ,
1519
        'ERGcda_imports'                        => 'MREF_Package',
1487
        'ERGcda_imports'                        => 'MREF_Package',
-
 
1488
        'daf_dataman_extras'                    => 'ProjectCD/seattle',
-
 
1489
        'XmlDocInterface'                       => 'MASS_Dev_Infra',
1520
 
1490
 
-
 
1491
 
-
 
1492
        # Kill single package subdirs
-
 
1493
        'application'                           => 'MASS_Dev_Bus',
-
 
1494
        'card'                                  => 'MASS_Dev_Bus',
-
 
1495
        'cardholder'                            => 'MASS_Dev_Bus',
-
 
1496
        'opman-database'                        => 'MASS_Dev_Bus',
-
 
1497
        'product'                               => 'MASS_Dev_Bus',
-
 
1498
        'VmtInterface'                          => 'MASS_Dev_Bus',
-
 
1499
        'systemcd_ejb-api'                      => 'MASS_Dev_Bus/CBP',
-
 
1500
        'boi'                                   => 'MASS_Dev_Bus/BOI',
-
 
1501
 
-
 
1502
        'mrviewer'                              => 'MASS_Dev_Infra/Reports',
-
 
1503
        'cdss'                                  => 'MASS_Dev_Infra/Cdss',
-
 
1504
        'InfraPSS'                              => 'MASS_Dev_Infra',
-
 
1505
        
1521
    );
1506
    );
1522
 
1507
 
1523
    my %VobRename = (
1508
    my %VobRename = (
1524
        'LMOS'              => 'LinuxDevices',
1509
        'LMOS'              => 'LinuxDevices',
1525
        'MANUFACTURING'     => 'Manufacturing',
1510
        'MANUFACTURING'     => 'Manufacturing',
Line 1529... Line 1514...
1529
        'MASS_Dev_Tools'    => 'DevTools',
1514
        'MASS_Dev_Tools'    => 'DevTools',
1530
 
1515
 
1531
        'GMPTE2005'             => 'ITSO_TRACS',
1516
        'GMPTE2005'             => 'ITSO_TRACS',
1532
        'GMPTE2005_obe'         => 'ITSO_TRACS',
1517
        'GMPTE2005_obe'         => 'ITSO_TRACS',
1533
        'UK_ITSO_COMPLIANT'     => 'ITSO_TRACS',
1518
        'UK_ITSO_COMPLIANT'     => 'ITSO_TRACS',
-
 
1519
 
-
 
1520
        'MASS_Dev_Infra/security'   => 'MASS_Dev_Infra/Security',
-
 
1521
        'MASS_Dev_Infra/web'        => 'MASS_Dev_Infra/Web',
-
 
1522
        'MASS_Dev_Infra/cdss'       => 'MASS_Dev_Infra/Cdss',
-
 
1523
    );
-
 
1524
 
-
 
1525
    my %PreferredPath = (
-
 
1526
        'MASS_Dev_Bus/Reports'      => 1,
-
 
1527
        'MASS_Dev_Bus/CBP'          => 1,
-
 
1528
        'MASS_Dev_Bus/Business'     => 1,
-
 
1529
        'MASS_Dev_Bus/CIPP'        => 1,
-
 
1530
 
-
 
1531
        'MASS_Dev_Infra/ProjectSpecific' => 1,
1534
    );
1532
    );
1535
 
1533
 
1536
    # default is 1
1534
    # default is 1
1537
    my %VobDepth = (
1535
    my %VobDepth = (
1538
        'DPG_SWBase'                => 2,
1536
        'DPG_SWBase'                => 2,
Line 1566... Line 1564...
1566
    #
1564
    #
1567
    #   Some path cleanup
1565
    #   Some path cleanup
1568
    #
1566
    #
1569
    if ( $path )
1567
    if ( $path )
1570
    {
1568
    {
-
 
1569
        $path =~ s~\s+~~i;
-
 
1570
        $path =~ s~/build.pl$~~i;
-
 
1571
        $path =~ s~/src$~~i;
1571
        $path =~ s~DPC_SWCode/~DPG_SWCode/~i;
1572
        $path =~ s~DPC_SWCode/~DPG_SWCode/~i;
1572
        $path =~ s~MASS_Dev/Bus/~MASS_Dev_Bus/~i;
1573
        $path =~ s~MASS_Dev/Bus/~MASS_Dev_Bus/~i;
1573
        $path =~ s~MASS_Dev_Bus/Cbp/~MASS_Dev_Bus/CBP/~i;
1574
        $path =~ s~MASS_Dev_Bus/Cbp/~MASS_Dev_Bus/CBP/~i;
-
 
1575
        $path =~ s~MASS_Dev_Bus/WebServices~MASS_Dev_Bus/WebServices~i;
1574
        $path =~ s~/Vastraffik/~/Vasttrafik/~;
1576
        $path =~ s~/Vastraffik/~/Vasttrafik/~;
1575
        $path =~ s~/MREF_Package/ergpostmongui$~/MREF_Package/ergpostmongui~i;
1577
        $path =~ s~/MREF_Package/ergpostmongui$~/MREF_Package/ergpostmongui~i;
1576
    }
1578
    }
1577
    
1579
    
1578
    #
1580
    #
Line 1681... Line 1683...
1681
 
1683
 
1682
    return "UNKNOWN"
1684
    return "UNKNOWN"
1683
        unless ( $vob );
1685
        unless ( $vob );
1684
 
1686
 
1685
    #
1687
    #
-
 
1688
    #   Can we map the package into a preferred path
-
 
1689
    #
-
 
1690
    foreach my $ppath ( sort keys %PreferredPath )
-
 
1691
    {
-
 
1692
        if ( $path =~ m~${ppath}(/|$)~i )
-
 
1693
        {
-
 
1694
#print "---- Preferred path: $name, $ppath\n";
-
 
1695
            return $ppath;
-
 
1696
        }
-
 
1697
 
-
 
1698
        #
-
 
1699
        #   Try a little harder
-
 
1700
        #
-
 
1701
        foreach my $tpath  ( keys %{$PackageData{$pkgid}{vobPath}} )
-
 
1702
        {
-
 
1703
            if ( $tpath =~ m~${ppath}(/|$)~i )
-
 
1704
            {
-
 
1705
#print "---- Preferred path: $name, $ppath\n";
-
 
1706
                return $ppath;
-
 
1707
            }
-
 
1708
        }
-
 
1709
    }
-
 
1710
 
-
 
1711
    #
1686
    #   Determine depth for this path
1712
    #   Determine depth for this path
1687
    #
1713
    #
1688
    my $depth = 1;
1714
    my $depth = 1;
1689
    foreach ( reverse sort keys %VobDepth)
1715
    foreach ( reverse sort keys %VobDepth)
1690
    {
1716
    {
Line 1692... Line 1718...
1692
        {
1718
        {
1693
            $depth = $VobDepth{$_};
1719
            $depth = $VobDepth{$_};
1694
            last;
1720
            last;
1695
        }
1721
        }
1696
    }
1722
    }
-
 
1723
 
1697
#print "--Joining: $name, $depth, @pathBase\n";
1724
#print "--Joining: $name, $depth, @pathBase\n";
1698
    return pathJoin($depth, $path, $name, @pathBase);
1725
    return pathJoin($depth, $path, $name, @pathBase);
1699
}
1726
}
1700
 
1727
 
1701
sub pathJoin
1728
sub pathJoin
Line 1952... Line 1979...
1952
#
1979
#
1953
# Description     : Cleanup and rewrite a vcstag
1980
# Description     : Cleanup and rewrite a vcstag
1954
#
1981
#
1955
#                   DUPLICATED IN:
1982
#                   DUPLICATED IN:
1956
#                       - cc2svn_procdata
1983
#                       - cc2svn_procdata
1957
#                       - cc2svn_impartpackage
1984
#                       - cc2svn_importpackage
1958
#
1985
#
1959
# Inputs          : vcstag
1986
# Inputs          : vcstag
1960
#
1987
#
1961
# Returns         : Cleaned up vcs tag
1988
# Returns         : Cleaned up vcs tag
1962
#
1989
#
Line 1964... Line 1991...
1964
{
1991
{
1965
    my ($tag) = @_;
1992
    my ($tag) = @_;
1966
    $tag =~ tr~\\/~/~;
1993
    $tag =~ tr~\\/~/~;
1967
    if ( $tag =~ m~^CC::~ )
1994
    if ( $tag =~ m~^CC::~ )
1968
    {
1995
    {
-
 
1996
        $tag =~ s~CC::load\s+~CC::~;                # Load rule
-
 
1997
        $tag =~ s~CC::\s+~CC::~;                    # Leading white space
-
 
1998
        $tag =~ s~CC::[A-Za-z]\:/~CC::/~;           # Leading driver letter
-
 
1999
        $tag =~ s~CC::/+~CC::/~;                    # Multiple initial /'s
-
 
2000
        $tag =~ s~/build.pl::~::~i;
1969
        $tag =~ s~CC::\s+~CC::~;
2001
        $tag =~ s~/src::~::~i;
1970
        $tag =~ s~MASS_Dev_Bus/Cbp/~MASS_Dev_Bus/CBP/~i;
2002
        $tag =~ s~MASS_Dev_Bus/Cbp/~MASS_Dev_Bus/CBP/~i;
1971
        $tag =~ s~MASS_Dev_Bus~MASS_Dev_Bus~i;
2003
        $tag =~ s~MASS_Dev_Bus~MASS_Dev_Bus~i;
1972
        $tag =~ s~/MASS_Dev/Infra~MASS_Dev_Infra~i;
2004
        $tag =~ s~/MASS_Dev/Infra~MASS_Dev_Infra~i;
1973
        $tag =~ s~/MASS_Dev/Bus/web~/MASS_Dev_Bus/web~i;
2005
        $tag =~ s~/MASS_Dev/Bus/web~/MASS_Dev_Bus/web~i;
1974
 
2006