Subversion Repositories DevTools

Rev

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

Rev 1270 Rev 1341
Line 125... Line 125...
125
#
125
#
126
my %PackageSet;
126
my %PackageSet;
127
my %PackageData;
127
my %PackageData;
128
my %Views;
128
my %Views;
129
my %Vobs;
129
my %Vobs;
-
 
130
my %ReleasePackages;
-
 
131
 
130
getBadLabelData();
132
getBadLabelData();
131
 
133
 
132
#
134
#
133
#   Remove packages that we don't need
135
#   Remove packages that we don't need
134
#
136
#
Line 192... Line 194...
192
        {
194
        {
193
            $PackageData{$pkgid}{youngAgeNonRipple} = $ScmPackages{$_}{Age};
195
            $PackageData{$pkgid}{youngAgeNonRipple} = $ScmPackages{$_}{Age};
194
        }
196
        }
195
    }
197
    }
196
 
198
 
197
 
-
 
198
    $PackageData{$pkgid}{name} = $ScmPackages{$_}{name} ;
199
    $PackageData{$pkgid}{name} = $ScmPackages{$_}{name} ;
-
 
200
 
-
 
201
    #
-
 
202
    #   Accumulate Release data
-
 
203
    #
-
 
204
    my $mname = $ScmPackages{$_}{'name'} . ($ScmPackages{$_}{'suffix'} || '');
-
 
205
    my $name = $ScmPackages{$_}{'name'};
-
 
206
    foreach my $rtag_id ( @{$ScmPackages{$_}{'release'}} )
-
 
207
    {
-
 
208
        unless ( $ScmReleases{$rtag_id}{'excluded'} )
-
 
209
        {
-
 
210
            $ReleasePackages{$rtag_id}{mname}{$mname}{count}++;
-
 
211
            $ReleasePackages{$rtag_id}{name}{$name}{count}++;
-
 
212
            push @{$ReleasePackages{$rtag_id}{mname}{$mname}{pvid}}, $_;
-
 
213
            push @{$ReleasePackages{$rtag_id}{name}{$name}{pvid}}, $_ ;
-
 
214
        }
-
 
215
    }
199
}
216
}
200
Warning ("Bad Package Data entries: " . $badCount ) if $badCount;
217
Warning ("Bad Package Data entries: " . $badCount ) if $badCount;
201
 
218
 
202
#
219
#
203
#   Tag packages with BadVob and MultiVob
220
#   Tag packages with BadVob and MultiVob
Line 264... Line 281...
264
    close $fh;
281
    close $fh;
265
    Message("Unique Package Names: $count");
282
    Message("Unique Package Names: $count");
266
#    DebugDumpData("PackageData", \%PackageData);
283
#    DebugDumpData("PackageData", \%PackageData);
267
}
284
}
268
 
285
 
-
 
286
#
-
 
287
#   Determine Releases that have multiple versions of a package
-
 
288
#   ie: xxxx.cr and xxxxx.ssw
-
 
289
#
-
 
290
 
-
 
291
 
-
 
292
 
269
##=pod
293
##=pod
270
###
294
###
271
###   Display MutiVob Packages
295
###   Display MutiVob Packages
272
###
296
###
273
##    foreach my $pkgid (  keys %PackageData )
297
##    foreach my $pkgid (  keys %PackageData )
Line 502... Line 526...
502
    print HTML "<dd>" . hRef("#ReleaseIndexExcluded"    ,'Excluded Releases');
526
    print HTML "<dd>" . hRef("#ReleaseIndexExcluded"    ,'Excluded Releases');
503
    print HTML "<dd>" . hRef("#CompletePackageIndex"    ,'Complete Package Index');
527
    print HTML "<dd>" . hRef("#CompletePackageIndex"    ,'Complete Package Index');
504
    print HTML "<dd>" . hRef("#PackageDetails"          ,'Package Conversion Details');
528
    print HTML "<dd>" . hRef("#PackageDetails"          ,'Package Conversion Details');
505
    print HTML "<dd>" . hRef("#BadPackageVersions"      ,'Bad Package Versions');
529
    print HTML "<dd>" . hRef("#BadPackageVersions"      ,'Bad Package Versions');
506
    print HTML "<dd>" . hRef("#BadPackageVersionsByProject",'Bad Package Versions By Project');
530
    print HTML "<dd>" . hRef("#BadPackageVersionsByProject",'Bad Package Versions By Project');
-
 
531
    print HTML "<dd>" . hRef("#MultiplePackages"        ,'Releases with duplicated packages');
507
    print HTML "<dd>" . hRef("#RepoIndex"               ,'Repository Index');
532
    print HTML "<dd>" . hRef("#RepoIndex"               ,'Repository Index');
508
    print HTML "<dd>" . hRef("#RepoMap"                 ,'Repository Mapping');
533
    print HTML "<dd>" . hRef("#RepoMap"                 ,'Repository Mapping');
509
    print HTML "<dd>" . hRef("#NotMapped"               ,'Unmapped Packages');
534
    print HTML "<dd>" . hRef("#NotMapped"               ,'Unmapped Packages');
510
    print HTML "<dd>" . hRef("#InSvn"                   ,'Packages in Subversion');
535
    print HTML "<dd>" . hRef("#InSvn"                   ,'Packages in Subversion');
511
    print HTML "</dl>\n";
536
    print HTML "</dl>\n";
Line 833... Line 858...
833
            }
858
            }
834
 
859
 
835
    }
860
    }
836
    
861
    
837
    print HTML $t->getTable;
862
    print HTML $t->getTable;
-
 
863
 
-
 
864
    #
-
 
865
    #   Releases that have multiple instances of the same package in them
-
 
866
    #
-
 
867
    print HTML header('MultiplePackages', 'Releases with duplicated packages');
-
 
868
    print HTML "Releases that have multiple instances of the same package\n";
-
 
869
#DebugDumpData("ReleasePackages", \%ReleasePackages );
-
 
870
 
-
 
871
    $t = new HTML::Table( -border=>1 );
-
 
872
    $t->addRow( 'Release','Package');
-
 
873
    $t->setRowHead(1,1);
-
 
874
    $last_proj_id = 0;
-
 
875
 
-
 
876
    foreach my $rtag_id ( sort sortReleases keys %ReleasePackages )
-
 
877
    {
-
 
878
        my @multiples;
-
 
879
        foreach my $name ( keys %{$ReleasePackages{$rtag_id}{name}} )
-
 
880
        {
-
 
881
            if ( $ReleasePackages{$rtag_id}{name}{$name}{count} > 1 )
-
 
882
            {
-
 
883
                push @multiples, $name;
-
 
884
            }
-
 
885
        }
-
 
886
        next unless ( @multiples );
-
 
887
 
-
 
888
        if ( $last_proj_id != $ScmReleases{$rtag_id}{proj_id} )
-
 
889
        {
-
 
890
            $last_proj_id = $ScmReleases{$rtag_id}{proj_id};
-
 
891
            $t->addRow( $ScmReleases{$rtag_id}{pName});
-
 
892
            $t->setCellColSpan(-1, 1, 2);
-
 
893
        }
-
 
894
 
-
 
895
        my $t2 = new HTML::Table(-border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
-
 
896
 
-
 
897
        foreach my $name ( sort {uc($a) cmp uc($b) } @multiples )
-
 
898
        {
-
 
899
            $t2->addRow('Package: ' . linkFindPkgs($name, $rtag_id),  );
-
 
900
            $t2->setCellColSpan(-1, 1, 2);
-
 
901
            foreach my $pvid ( @{$ReleasePackages{$rtag_id}{name}{$name}{pvid}} )
-
 
902
            {
-
 
903
                $t2->addRow( '&nbsp;', linkPvid($pvid, $rtag_id) );
-
 
904
            }
-
 
905
        }
-
 
906
 
-
 
907
        $t->addRow(linkRelease($rtag_id, undef, 1), $t2->getTable  );
-
 
908
    }
-
 
909
    $t->setColClass (1, 'listTitle' );
-
 
910
    $t->setColHead(1,1);
-
 
911
    print HTML $t->getTable;
-
 
912
    
-
 
913
 
-
 
914
    print HTML header('RepoIndex', 'Repository Index');
-
 
915
    print HTML "A summary of proposed Repostories and Paths\n";
-
 
916
 
-
 
917
    $t = new HTML::Table( -border=>0, -padding=>0, -spacing=>0, -class=>'paddedTable' );
-
 
918
    $t->addRow( 'Name','', 'Count', 'Warnings'  );
-
 
919
    $t->setCellColSpan(1, 1, 2);
-
 
920
    foreach my $repo ( sort {uc($a) cmp uc($b) } keys %RepoSubIndex )
-
 
921
    {
-
 
922
            next if ( $repo eq 'UNKNOWN' );
-
 
923
            next if ( $repo eq 'SVN' );
-
 
924
            my $count = '';
-
 
925
            if ( exists $RepoSubIndex{$repo}{'-'}   )
-
 
926
            {
-
 
927
                $count = @{$RepoSubIndex{$repo}{'-'}};
-
 
928
            }
-
 
929
            $t->addRow( hRef("#Repo_$repo", $repo), '', $count  );
-
 
930
            $t->setCellColSpan($t->getTableRows(), 1, 2);
-
 
931
 
-
 
932
            foreach my $path ( sort {uc($a) cmp uc($b) } keys %{$RepoSubIndex{$repo}} )
-
 
933
            {
-
 
934
                    next if ( $path eq '-' );
-
 
935
                    my $depth = $path =~ tr~/~~;
-
 
936
                    my $warn = ($depth > 2) ? ' - Deeply nested' : '';
-
 
937
                    my $count = (@{$RepoSubIndex{$repo}{$path}});
-
 
938
                    $warn .= ' - Only One Package' if ( $count < 2 );
-
 
939
 
-
 
940
                    $t->addRow( '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', hRef("#Repo_$repo/$path", $path), $count, $warn);
-
 
941
            }
-
 
942
 
-
 
943
    }
838
    
944
    
-
 
945
    print HTML $t->getTable;
-
 
946
 
-
 
947
 
-
 
948
 
839
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
949
#DebugDumpData("RepoSubIndex", \%RepoSubIndex);
840
#DebugDumpData("Repos", \%Repos);
950
#DebugDumpData("Repos", \%Repos);
841
    
951
    
842
    #
952
    #
843
    #   Repo back reference
953
    #   Repo back reference
Line 1181... Line 1291...
1181
    $text .= "$ScmPackages{$pvid}{'name'} " unless ( $mode );
1291
    $text .= "$ScmPackages{$pvid}{'name'} " unless ( $mode );
1182
    $text .= $ScmPackages{$pvid}{'version'};
1292
    $text .= $ScmPackages{$pvid}{'version'};
1183
    return hRef($pv_base, $text, '_packageData');
1293
    return hRef($pv_base, $text, '_packageData');
1184
}
1294
}
1185
 
1295
 
-
 
1296
sub linkFindPkgs
-
 
1297
{
-
 
1298
    my ($name, $rtagid) = @_;
-
 
1299
    my $pv_base = $GBE_RM_URL . "/find.asp?searchtype=1&keyword=$name&btn=Find&envtab=3&rtag_id=$rtagid";
-
 
1300
    return hRef($pv_base, $name, '_packageData');
-
 
1301
}
-
 
1302
 
1186
sub linkPkg
1303
sub linkPkg
1187
{
1304
{
1188
    my ($pkgid, $utext) = @_;
1305
    my ($pkgid, $utext) = @_;
1189
    my $rm_base = $GBE_RM_URL . "/view_by_version.asp?pkg_id=$pkgid";
1306
    my $rm_base = $GBE_RM_URL . "/view_by_version.asp?pkg_id=$pkgid";
1190
    my $text = $utext ? $utext : $PackageData{$pkgid}{name};
1307
    my $text = $utext ? $utext : $PackageData{$pkgid}{name};