Subversion Repositories DevTools

Rev

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

Rev 1380 Rev 1451
Line 160... Line 160...
160
 
160
 
161
my %notCots = (
161
my %notCots = (
162
    'isl'       => 1,
162
    'isl'       => 1,
163
);
163
);
164
 
164
 
-
 
165
my $ukHopsMode = 0;
-
 
166
my %ukHopsReleases = (
-
 
167
    '6222'      => { name => 'MainLine', 'trunk' => 1 },
-
 
168
    '17223'     => { name => 'Hops4' },
-
 
169
    '21864'     => { name => 'Hops3.6' },
-
 
170
    '14503'     => { name => 'Hops3' },
-
 
171
);
-
 
172
 
165
################################################################################
173
################################################################################
166
#   Global data
174
#   Global data
167
#
175
#
168
my $VERSION = "1.0.0";
176
my $VERSION = "1.0.0";
169
my $RM_DB;
177
my $RM_DB;
Line 827... Line 835...
827
                    $versions{$entry}{newSuffix} = 1;
835
                    $versions{$entry}{newSuffix} = 1;
828
                }
836
                }
829
            }
837
            }
830
        }
838
        }
831
    }
839
    }
-
 
840
 
-
 
841
    #
-
 
842
    #   Mark UkHops special points
-
 
843
    #
-
 
844
    foreach my $entry ( keys(%versions) ) {
-
 
845
        foreach my $rtag_id ( keys %{$versions{$entry}{Releases}}  ) {
-
 
846
            next unless ( exists $ukHopsReleases{$rtag_id} );
-
 
847
            next unless ( $svnRepo =~ m~/ITSO_TRACS$~ );
-
 
848
 
-
 
849
            #
-
 
850
            #   This package is current in a special ukHops release
-
 
851
            #   Need to handle the differently
-
 
852
            #
-
 
853
            my $ukData =  $ukHopsReleases{$rtag_id};
-
 
854
 
-
 
855
            # Mark version we want on the trunk
-
 
856
            # Will calculate tip later
-
 
857
            if ( $ukData->{trunk} )
-
 
858
            {
-
 
859
                #
-
 
860
                #   Can only place on trunk IFF its a tip
-
 
861
                #   May have a WIP.
-
 
862
                #   Solution. Walk to the tip, but only if there is one
-
 
863
                #             path.
-
 
864
                #
-
 
865
                my $end = $entry;
-
 
866
                my $last;
-
 
867
                while ( $end )
-
 
868
                {
-
 
869
                    $last = $end;
-
 
870
                    if ( @{$versions{$end}{next}} > 1)
-
 
871
                    {
-
 
872
                        Warning ("Uk Release. Preferred trunk is not a tip: $versions{$entry}{vname}");
-
 
873
                        last;
-
 
874
                    }
-
 
875
 
-
 
876
                    $end = @{$versions{$end}{next}}[0];
-
 
877
                }
-
 
878
                $versions{$last}{ukTrunk} = 1 ;
-
 
879
            }
-
 
880
 
-
 
881
            #
-
 
882
            #   What to do if the version is in more than one release
-
 
883
            #
-
 
884
            $versions{$entry}{ukBranch}++;
-
 
885
            if ( $versions{$entry}{ukBranch} > 1 )
-
 
886
            {
-
 
887
                Warning ("Version found in multiple Uk Releases - don't know what to do");
-
 
888
            }
-
 
889
 
-
 
890
            #
-
 
891
            #   What to do if the package has multiple version in a release
-
 
892
            #
-
 
893
            $ukData->{count}++;
-
 
894
            if ( $ukData->{count} > 1 )
-
 
895
            {
-
 
896
                Warning ("Package has multiple versions in the one Uk Release: $versions{$entry}{Releases}{$rtag_id}{rname}");
-
 
897
            }
-
 
898
        }
-
 
899
    }
832
    
900
    
833
    #
901
    #
834
    #   Prune
902
    #   Prune
835
    #   Marks paths to root for all essential packages
903
    #   Marks paths to root for all essential packages
836
    #   Marks the last-N from all essential packages
904
    #   Marks the last-N from all essential packages
Line 1019... Line 1087...
1019
            if (!defined($lastSuffix) || ($versions{$entry}{suffix} ne $lastSuffix) )
1087
            if (!defined($lastSuffix) || ($versions{$entry}{suffix} ne $lastSuffix) )
1020
            {
1088
            {
1021
                $maxVersion = '0';
1089
                $maxVersion = '0';
1022
                $visitId++;
1090
                $visitId++;
1023
                $forceTip = ( exists $tipVersions{$versions{$entry}{vname}} );
1091
                $forceTip = ( exists $tipVersions{$versions{$entry}{vname}} );
-
 
1092
                $forceTip = 1 if $versions{$entry}{ukTrunk};
1024
                delete $tipVersions{$versions{$entry}{vname}};
1093
                delete $tipVersions{$versions{$entry}{vname}};
1025
                $maxVersion = '999.999.999.999.zzz' if ( $forceTip );
1094
                $maxVersion = '999.999.999.999.zzz' if ( $forceTip );
1026
                $lastSuffix = $versions{$entry}{suffix};
1095
                $lastSuffix = $versions{$entry}{suffix};
1027
#print "---Tip Found\n" if $forceTip;
1096
#print "---Tip Found\n" if $forceTip;
1028
            }
1097
            }
Line 3092... Line 3161...
3092
#        $stateText .= ' M='. $versions{$entry}{maxVersion} if (exists $versions{$entry}{maxVersion});
3161
#        $stateText .= ' M='. $versions{$entry}{maxVersion} if (exists $versions{$entry}{maxVersion});
3093
 
3162
 
3094
        push @label, "(${stateText})" if ( $stateText );
3163
        push @label, "(${stateText})" if ( $stateText );
3095
 
3164
 
3096
##       Insert Release Names
3165
##       Insert Release Names
3097
#        foreach my $rtag_id ( keys %{$versions{$entry}{Releases}}  ) {
3166
        foreach my $rtag_id ( keys %{$versions{$entry}{Releases}}  ) {
-
 
3167
            next unless ( exists $ukHopsReleases{$rtag_id} );
3098
#            push @label, "Release: $versions{$entry}{Releases}{$rtag_id}{rname}";
3168
            push @label, "Release: $versions{$entry}{Releases}{$rtag_id}{rname}";
3099
#        }
3169
        }
3100
 
3170
 
3101
        return join ('\n', @label );
3171
        return join ('\n', @label );
3102
    }
3172
    }
3103
 
3173
 
3104
    sub genAttributes
3174
    sub genAttributes