Subversion Repositories DevTools

Rev

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

Rev 2553 Rev 2635
Line 69... Line 69...
69
my $opt_vobMap;
69
my $opt_vobMap;
70
my $opt_preserveProjectBase;
70
my $opt_preserveProjectBase;
71
my $opt_ignoreProjectBaseErrors;
71
my $opt_ignoreProjectBaseErrors;
72
my $opt_ignoreMakeProjectErrors;
72
my $opt_ignoreMakeProjectErrors;
73
my $opt_forceProjectBase;
73
my $opt_forceProjectBase;
74
my $opt_limitProjectBase;
74
my @opt_limitProjectBase;
75
my $opt_ignoreBadPaths;
75
my $opt_ignoreBadPaths;
76
my $opt_delete;
76
my $opt_delete;
77
my $opt_recentAge = 14;             # Days
77
my $opt_recentAge = 14;             # Days
78
my $opt_relabel = 0;
78
my $opt_relabel = 0;
79
my $opt_protected;
79
my $opt_protected;
80
my $opt_useSvn = 1;
80
my $opt_useSvn = 1;
81
my $opt_testRmDatabase;
81
my $opt_testRmDatabase;
82
my $opt_extractFromSvn;
82
my $opt_extractFromSvn;
83
my $opt_AllowMuliplePaths;
83
my $opt_AllowMuliplePaths = 1;      #29-Nov-2012
84
my $opt_resume;
84
my $opt_resume;
85
 
85
 
86
################################################################################
86
################################################################################
87
#   List of Projects Suffixes and Branch Names to be used within SVN
87
#   List of Projects Suffixes and Branch Names to be used within SVN
88
#
88
#
Line 200... Line 200...
200
    'dm_utils'                  => 'AllowMultiPath',
200
    'dm_utils'                  => 'AllowMultiPath',
201
    'dm_udxml'                  => 'AllowMultiPath',
201
    'dm_udxml'                  => 'AllowMultiPath',
202
    'HCP5000_resources'         => 'AllowMultiPath',
202
    'HCP5000_resources'         => 'AllowMultiPath',
203
    'massrtswis'                => 'AllowMultiPath',
203
    'massrtswis'                => 'AllowMultiPath',
204
    'pcp5000'                   => 'AllowMultiPath,ForceProjectBase=/DPG_SWCode',
204
    'pcp5000'                   => 'AllowMultiPath,ForceProjectBase=/DPG_SWCode',
205
    'PFTPi'                   => 'AllowMultiPath,IgnoreMakeProject,ForceProjectBase=/DPG_SWCode',  # Looks OK
205
    'PFTPi'                     => 'AllowMultiPath,IgnoreMakeProject,ForceProjectBase=/DPG_SWCode',  # Looks OK
206
    'PFTPu'                   => 'AllowMultiPath,IgnoreMakeProject,ForceProjectBase=/DPG_SWCode',  # Looks OK
206
    'PFTPu'                     => 'AllowMultiPath,IgnoreMakeProject,ForceProjectBase=/DPG_SWCode',  # Looks OK
207
    'WinCEBlocker'            => ',IgnoreMakeProject,',  # Looks OK
207
    'WinCEBlocker'              => ',IgnoreMakeProject,',  # Looks OK
208
    'WinCEDeviceAutoInject'   => ',IgnoreMakeProject,',  # Looks OK
208
    'WinCEDeviceAutoInject'     => ',IgnoreMakeProject,',  # Looks OK
209
    'WinCEReboot'             => ',IgnoreMakeProject,',  # Looks OK
209
    'WinCEReboot'               => ',IgnoreMakeProject,',  # Looks OK
210
    'rsmaint'                 => 'AllowMultiPath',
210
    'rsmaint'                   => 'AllowMultiPath',
211
    'sysbasetypes'            => 'AllowMultiPath',
211
    'sysbasetypes'              => 'AllowMultiPath',
212
    'syscd'                   => 'AllowMultiPath',
212
    'syscd'                     => 'AllowMultiPath',
213
    'sysswis'                 => 'AllowMultiPath',
213
    'sysswis'                   => 'AllowMultiPath',
214
    'udserialiser'              => 'AllowMultiPath',
214
    'udserialiser'              => 'AllowMultiPath',
215
    'systemcdtables'            => 'AllowMultiPath',
215
    'systemcdtables'            => 'AllowMultiPath',
216
    'udxml'                     => 'AllowMultiPath',
216
    'udxml'                     => 'AllowMultiPath',
217
    'ERGoracs'                  => 'AllowMultiPath',
217
    'ERGoracs'                  => 'AllowMultiPath',
218
    'daf_cd_desfireparams'      => 'AllowMultiPath',
218
    'daf_cd_desfireparams'      => 'AllowMultiPath',
219
    'daf_ct_mag_virtual'        => 'AllowMultiPath',
219
    'daf_ct_mag_virtual'        => 'AllowMultiPath',
220
    'daf_br_applets'        => 'AllowMultiPath',
220
    'daf_br_applets'            => 'AllowMultiPath',
221
    'daf_paper_variables'        => 'AllowMultiPath',
221
    'daf_paper_variables'       => 'AllowMultiPath',
222
    'daf_transap_api'        => 'AllowMultiPath,ForceProjectBase=/DPG_SWBase/transap',
222
    'daf_transap_api'           => 'AllowMultiPath,ForceProjectBase=/DPG_SWBase/transap',
223
    'daf_br_applets'         => 'AllowMultiPath,IgnoreProjectBase',  # Not used
223
    'daf_br_applets'            => 'AllowMultiPath,IgnoreProjectBase',  # Not used
224
    'daf_udlib_api'        => 'AllowMultiPath,ForceProjectBase=/DPG_SWBase/ud',
224
    'daf_udlib_api'             => 'AllowMultiPath,ForceProjectBase=/DPG_SWBase/ud',
-
 
225
    'daf_ct_mcr_14443'          => 'LimitProjectBase=/DPG_SWBase/ct',
-
 
226
 
-
 
227
 
-
 
228
    'daftestcd_sales'               => 'AllowMultiPath,ForceProjectBase=/ProjectCD/seattle',
-
 
229
    'daftestcd_vanpool'             => 'AllowMultiPath,ForceProjectBase=/ProjectCD',
-
 
230
    'daf_transap_edf'               => 'AllowMultiPath,IgnoreProjectBase',
-
 
231
    'daf_transap_extensions'        => 'AllowMultiPath',
-
 
232
    'daf_transap_proxyman_rkf_mag'  => 'AllowMultiPath',
-
 
233
    'daf_utils_appupgrade'          => 'AllowMultiPath',
-
 
234
    'dc5000'                        => 'AllowMultiPath,IgnoreMakeProject,ForceProjectBase=/DPG_SWCode',
-
 
235
    'uiconv'                        => 'AllowMultiPath',
-
 
236
 
-
 
237
    'daf_ct_api'                    => 'AllowMultiPath',
-
 
238
    
-
 
239
 
-
 
240
    'ocpsupport'                    => 'AllowMultiPath,IgnoreMakeProject', # MakeProject Tested on at least one
-
 
241
    'emv_cs_test_ingenico'          => 'AllowMultiPath,IgnoreMakeProject', # MakeProject Tested on at least one
-
 
242
    'deviceicons'                   => 'AllowMultiPath,LimitProjectBase=/DPG_SWBase/resources:/DPG_SWCode/resources',
-
 
243
    'pcv_final_wce'                 => 'IgnoreMakeProject', # MakeProject Tested on at least one
-
 
244
    'pcv_wce'                       => 'IgnoreMakeProject', # MakeProject Tested on at least one
-
 
245
    'WinCEDeviceUpgrade'            => 'IgnoreMakeProject', # MakeProject Tested on at least one
-
 
246
    'scil'                          => 'LimitProjectBase=/DPG_SWCode/projects/seattle/tvm',
-
 
247
    'daf_br_compiler_support'       => 'ForceProjectBase=/DPG_SWBase/daf_br_compiler/support',
-
 
248
    'daf_br_th'                     => 'IgnoreBadPath,all,IgnoreMakeProject', # MakeProject Tested. Bad Paths not used
225
 
249
 
226
 
250
 
227
    'daf_ct_mcr_14443'          => 'LimitProjectBase=/DPG_SWBase/ct',
-
 
228
 
251
 
229
    'icl'                   => 'IgnoreProjectBase,',
252
    'icl'                   => 'IgnoreProjectBase,',
230
    'itso'                  => 'IgnoreProjectBase,',
253
    'itso'                  => 'IgnoreProjectBase,',
231
#    'daf_osa_mos'           => 'IgnoreProjectBase,',
254
#    'daf_osa_mos'           => 'IgnoreProjectBase,',
232
    'daf_utils_mos'         => 'IgnoreProjectBase,',
255
    'daf_utils_mos'         => 'IgnoreProjectBase,',
Line 727... Line 750...
727
            $opt_AllowMuliplePaths = 1;
750
            $opt_AllowMuliplePaths = 1;
728
            Message ("Force Project Base: $opt_forceProjectBase");
751
            Message ("Force Project Base: $opt_forceProjectBase");
729
        }
752
        }
730
 
753
 
731
        if ( $data =~ m~,LimitProjectBase=(.*),~ ) {
754
        if ( $data =~ m~,LimitProjectBase=(.*),~ ) {
732
            $opt_limitProjectBase = $1;
-
 
733
            $opt_AllowMuliplePaths = 1;
755
            $opt_AllowMuliplePaths = 1;
-
 
756
            @opt_limitProjectBase = split(':', $1);
734
            Message ("Limit Project Base: $opt_forceProjectBase");
757
            Message ("Limit Project Base: @opt_limitProjectBase");
735
        }
758
        }
736
        
759
        
737
 
760
 
738
        if ( index( $data, 'IgnoreProjectBase,' ) >= 0) {
761
        if ( index( $data, 'IgnoreProjectBase,' ) >= 0) {
739
            $opt_ignoreProjectBaseErrors = 1;
762
            $opt_ignoreProjectBaseErrors = 1;
Line 1061... Line 1084...
1061
        }
1084
        }
1062
    }
1085
    }
1063
    
1086
    
1064
    #
1087
    #
1065
    #   Prune
1088
    #   Prune
1066
    #   Marks paths to root for all essential packages
1089
    #       Marks paths to root for all essential packages
1067
    #   Marks the last-N from all essential packages
1090
    #       Marks the last-N from all essential packages
1068
    #
1091
    #
1069
    if ( $pruneMode )
1092
    if ( $pruneMode )
1070
    {
1093
    {
1071
        Message ("Prune Tree: $pruneModeString");
1094
        Message ("Prune Tree: $pruneModeString");
1072
        foreach ( @EssentialPackages )
1095
        foreach ( @EssentialPackages )
Line 1092... Line 1115...
1092
        #
1115
        #
1093
        #   Keep recent versions
1116
        #   Keep recent versions
1094
        #       Keep versions created in the last N days
1117
        #       Keep versions created in the last N days
1095
        #       Will keep recent ripples too
1118
        #       Will keep recent ripples too
1096
        #
1119
        #
1097
        if ( $pruneMode == 1 )
1120
        if ( $pruneMode == 1 )                      # 1 == ripple
1098
        {
1121
        {
1099
            foreach my $entry ( keys(%versions) )
1122
            foreach my $entry ( keys(%versions) )
1100
            {
1123
            {
1101
                next unless ( $versions{$entry}{Age} <= $opt_recentAge  );
1124
                next unless ( $versions{$entry}{Age} <= $opt_recentAge  );
1102
                $versions{$entry}{keepRecent} = 1;
1125
                $versions{$entry}{keepRecent} = 1;
1103
                $recentCount++;
1126
                $recentCount++;
1104
#print "--- Recent version $versions{$entry}{vname}, $versions{$entry}{Age} <= $opt_recentAge\n";
1127
#print "--- Recent version $versions{$entry}{vname}, $versions{$entry}{Age} <= $opt_recentAge\n";
1105
            }
1128
            }
1106
 
1129
 
1107
#            #
1130
            #
1108
#            #   Keep the tip of each branch
1131
            #   Keep the tip of each branch
1109
#            #
1132
            #
1110
#            foreach my $entry ( @endPoints )
1133
            foreach my $entry ( @endPoints )
1111
#            {
1134
            {
-
 
1135
#print "--- Tip version $versions{$entry}{vname}\n";
-
 
1136
                my $count = 0;
-
 
1137
                while ( $entry && $count < 2)
-
 
1138
                {
1112
#                next if exists $versions{$entry}{keepRecent};
1139
                    last if ( $versions{$entry}{Essential} );
1113
#                $versions{$entry}{keepRecent} = 1;
1140
                    last if ( $versions{$entry}{keepRecent} );
-
 
1141
 
-
 
1142
                    next if ( $versions{$entry}{locked} eq 'N'  );
-
 
1143
                    next if ( $versions{$entry}{DeadWood} );
-
 
1144
 
1114
##print "--- Tip version $versions{$entry}{vname}\n";
1145
#print "--- Keeping Tip version $versions{$entry}{vname}\n";
-
 
1146
                    $versions{$entry}{keepRecent} = 1;
-
 
1147
                    $count++;
-
 
1148
 
-
 
1149
                } continue {
-
 
1150
                    $entry = $versions{$entry}{last};
-
 
1151
                }
1115
#            }
1152
            }
1116
        }
1153
        }
1117
        
1154
        
1118
        #
1155
        #
1119
        #   Keep versions that are common parents to Essential Versions
1156
        #   Keep versions that are common parents to Essential Versions
1120
        #       Mark paths through the tree to essential versions
1157
        #       Mark paths through the tree to essential versions
Line 1945... Line 1982...
1945
        }
1982
        }
1946
 
1983
 
1947
        $cc_path = $opt_forceProjectBase
1984
        $cc_path = $opt_forceProjectBase
1948
            if ( $opt_forceProjectBase );
1985
            if ( $opt_forceProjectBase );
1949
 
1986
 
1950
        if ( $opt_limitProjectBase )
1987
        foreach ( @opt_limitProjectBase )
1951
        {
1988
        {
1952
            if ( $cc_path =~ m~$opt_limitProjectBase~ )
1989
            if ( $cc_path =~ m~$_~ )
1953
            {
1990
            {
1954
                $cc_path = $opt_limitProjectBase;
1991
                $cc_path = $_;
-
 
1992
                last;
1955
            }
1993
            }
1956
        }
1994
        }
1957
        
1995
        
1958
        if ( $cc_path_original ne $cc_path )
1996
        if ( $cc_path_original ne $cc_path )
1959
        {
1997
        {
Line 1984... Line 2022...
1984
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
2022
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
1985
    #
2023
    #
1986
    #   Attempt to suck up empty directories below the specified
2024
    #   Attempt to suck up empty directories below the specified
1987
    #   source path
2025
    #   source path
1988
    #
2026
    #
1989
    unless ( $opt_preserveProjectBase || $opt_forceProjectBase )
2027
    unless ( $opt_preserveProjectBase || $opt_forceProjectBase || @opt_limitProjectBase)
1990
    {
2028
    {
1991
        #
2029
        #
1992
        #   Look in ViewPath
2030
        #   Look in ViewPath
1993
        #   If it contains only ONE directory then we can suck it up
2031
        #   If it contains only ONE directory then we can suck it up
1994
        #
2032
        #
Line 2028... Line 2066...
2028
    {
2066
    {
2029
        unless ( $opt_ignoreProjectBaseErrors )
2067
        unless ( $opt_ignoreProjectBaseErrors )
2030
        {
2068
        {
2031
            $data->{BadProjectBase}++;
2069
            $data->{BadProjectBase}++;
2032
            $data->{errStr} = 'Bad usage of ProjectBase detected';
2070
            $data->{errStr} = 'Bad usage of ProjectBase detected';
-
 
2071
            Warning ("ProjectBase Error");
2033
            return 4;           # Lets see what the others look like too
2072
            return 4;           # Lets see what the others look like too
2034
#            return 14;
2073
#            return 14;
2035
        }
2074
        }
2036
    }
2075
    }
2037
 
2076
 
Line 2559... Line 2598...
2559
    #
2598
    #
2560
    foreach my $entry ( @processOrder )
2599
    foreach my $entry ( @processOrder )
2561
    {
2600
    {
2562
        $versions{$entry}{Scanned} = 1;
2601
        $versions{$entry}{Scanned} = 1;
2563
        next unless ( $versions{$entry}{TagCreated} );
2602
        next unless ( $versions{$entry}{TagCreated} );
-
 
2603
        my $eflag = $versions{$entry}{Essential} ? 'E' : ' ';
2564
        Warning ("Processed: " . GetVname($entry) . ' :: ' . $versions{$entry}{rmRef} || $versions{$entry}{errStr} || '???' );
2604
        Warning ("Processed:$eflag:" . GetVname($entry) . ' :: ' . $versions{$entry}{rmRef} || $versions{$entry}{errStr} || '???' );
2565
    }
2605
    }
2566
 
2606
 
2567
    #
2607
    #
2568
    #   Display versions that did not get created
2608
    #   Display versions that did not get created
2569
    #
2609
    #
Line 2579... Line 2619...
2579
            next;
2619
            next;
2580
        }
2620
        }
2581
 
2621
 
2582
        my $reason = $versions{$entry}{data}{errStr} || '';
2622
        my $reason = $versions{$entry}{data}{errStr} || '';
2583
        my $tag = $versions{$entry}{vcsTag}|| 'No Tag';
2623
        my $tag = $versions{$entry}{vcsTag}|| 'No Tag';
-
 
2624
        my $eflag = $versions{$entry}{Essential} ? 'E' : ' ';
2584
        Warning ("Not Processed: " . GetVname($entry) . ':' . $tag . ' : ' . $reason );
2625
        Warning ("Not Processed:$eflag: " . GetVname($entry) . ':' . $tag . ' : ' . $reason );
2585
        $notProcessedCount++;
2626
        $notProcessedCount++;
2586
    }
2627
    }
2587
 
2628
 
2588
    foreach my $entry ( keys(%versions) )
2629
    foreach my $entry ( keys(%versions) )
2589
    {
2630
    {
Line 2607... Line 2648...
2607
    }
2648
    }
2608
 
2649
 
2609
    Message ("Packages processed: $processedCount");
2650
    Message ("Packages processed: $processedCount");
2610
    Warning ("Packages not processed: $notProcessedCount") if ( $notProcessedCount );
2651
    Warning ("Packages not processed: $notProcessedCount") if ( $notProcessedCount );
2611
    Warning ("Internal Errors: $inernalErrorCount") if ( $inernalErrorCount );
2652
    Warning ("Internal Errors: $inernalErrorCount") if ( $inernalErrorCount );
-
 
2653
    Warning ("Multiple source paths", @multiplePaths ) if ( scalar @multiplePaths > 1 );
2612
    Message ("Packages Relabled: $packageReLabelCount") if ( $packageReLabelCount );
2654
    Message ("Packages Relabled: $packageReLabelCount") if ( $packageReLabelCount );
2613
    Warning ("Packages with Bad Paths: $badPathCount") if ( $badPathCount );
2655
    Warning ("Packages with Bad Paths: $badPathCount") if ( $badPathCount );
2614
    Warning ("Packages with Bad ProjectBase: $badProjectBaseCount") if ( $badProjectBaseCount );
2656
    Warning ("Packages with Bad ProjectBase: $badProjectBaseCount") if ( $badProjectBaseCount );
2615
    Warning ("Packages with MakeProjects: $badMakeProjectCount") if ( $badMakeProjectCount );
2657
    Warning ("Packages with MakeProjects: $badMakeProjectCount") if ( $badMakeProjectCount );
2616
    Warning ("Global Error Detected") if ( $globalError );
2658
    Warning ("Global Error Detected") if ( $globalError );
2617
    Message ("All Done");
2659
    Message ("---- All Done -----");
2618
}
2660
}
2619
 
2661
 
2620
#-------------------------------------------------------------------------------
2662
#-------------------------------------------------------------------------------
2621
# Function        : extractFilesFromClearCase
2663
# Function        : extractFilesFromClearCase
2622
#
2664
#