Subversion Repositories DevTools

Rev

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

Rev 2763 Rev 2909
Line 84... Line 84...
84
my $opt_extractFromSvn;
84
my $opt_extractFromSvn;
85
my $opt_AllowMuliplePaths = 1;      #29-Nov-2012
85
my $opt_AllowMuliplePaths = 1;      #29-Nov-2012
86
my $opt_resume;
86
my $opt_resume;
87
my $opt_processRipples = 1;
87
my $opt_processRipples = 1;
88
my $opt_mergePackages;
88
my $opt_mergePackages;
-
 
89
my @opt_deleteFiles;
89
 
90
 
90
################################################################################
91
################################################################################
91
#   List of Projects Suffixes and Branch Names to be used within SVN
92
#   List of Projects Suffixes and Branch Names to be used within SVN
92
#
93
#
93
#       Name        - Name of branch for the project
94
#       Name        - Name of branch for the project
Line 141... Line 142...
141
    '.pxxx.sea'     => '.sea',
142
    '.pxxx.sea'     => '.sea',
142
    '.pxxx.syd'     => '.syd',
143
    '.pxxx.syd'     => '.syd',
143
    '.pxxx.sydddd'  => '.syd',
144
    '.pxxx.sydddd'  => '.syd',
144
    '.oslo'         => '.oso',
145
    '.oslo'         => '.oso',
145
    '.osl'          => '.oso',
146
    '.osl'          => '.oso',
-
 
147
    '.0x3'          => '.cr',
-
 
148
    '.0x4'          => '.cr',
-
 
149
    '.0x5'          => '.cr',
-
 
150
    '.0x13'         => '.cr',
146
);
151
);
147
 
152
 
148
my %specialPackages = (
153
my %specialPackages = (
149
    'core_devl'           =>  ',all,protected,',
154
    'core_devl'           =>  ',all,protected,',
150
    'daf_utils_mos'       => ',flat,',
155
    'daf_utils_mos'       => ',flat,',
Line 259... Line 264...
259
    'daf_br_th'                     => 'IgnoreBadPath,all,IgnoreMakeProject', # MakeProject Tested. Bad Paths not used
264
    'daf_br_th'                     => 'IgnoreBadPath,all,IgnoreMakeProject', # MakeProject Tested. Bad Paths not used
260
    'linux_kernel_bcp4600'          => 'ForceProjectBase=/LMOS/linux/kernel',
265
    'linux_kernel_bcp4600'          => 'ForceProjectBase=/LMOS/linux/kernel',
261
    'linux_kernel_viper'            => 'ForceProjectBase=/LMOS/linux/kernel',
266
    'linux_kernel_viper'            => 'ForceProjectBase=/LMOS/linux/kernel',
262
    'linux_kernel_cobra'            => 'ForceProjectBase=/LMOS/linux/kernel',
267
    'linux_kernel_cobra'            => 'ForceProjectBase=/LMOS/linux/kernel',
263
 
268
 
264
    'LinuxDrivers'                  => 'flatTime,LimitProjectBase=/LMOS/linux/drivers'.
269
    'LinuxDrivers'                  => 'flatTime,processRipples,LimitProjectBase=/LMOS/linux/drivers'.
265
                                       ',mergePaths=modules:bcp4600:cobra:eb5600:etx86:tp5600:viper',
270
                                       ',mergePaths=modules:bcp4600:cobra:eb5600:etx86:tp5600:viper',
266
 
271
 
267
    'flashCopier'                   => 'flatTime,LimitProjectBase=/LMOS/tools/flashCopier'.
272
    'flashCopier'                   => 'flatTime,LimitProjectBase=/LMOS/tools/flashCopier'.
268
                                       ',mergePaths=+:src:pcp5700:eb5600:tp5600',
273
                                       ',mergePaths=+:src:pcp5700:eb5600:tp5600',
269
 
274
 
270
    'u-boot'                        => 'flatTime,LimitProjectBase=/LMOS/linux/bootstrap/u-boot'.
275
    'u-boot'                        => 'flatTime,LimitProjectBase=/LMOS/linux/bootstrap/u-boot'.
271
                                       ',mergePaths=+:src:u-boot:u-boot-hk',
276
                                       ',mergePaths=+:src:u-boot:u-boot-hk',
272
 
277
 
273
    'dams5000'                      => 'flatTime,LimitProjectBase=/LMOS/apps/dams'.
278
    'dams_gen1'                      => 'flatTime,LimitProjectBase=/LMOS/apps/dams'.
274
                                       ',mergePaths=+:tp5600:eb5600:pcp5700:core:doc'.
279
                                       ',mergePaths=+:tp5600:eb5600:pcp5700:core:doc'.
275
                                       ',processRipples',
280
                                       ',processRipples',
276
 
281
 
277
    'linux_day0fs_5000'            => 'flatTime,LimitProjectBase=/LMOS/linux/filesystems/day0-fs'.
282
    'linux_day0fs_gen1'            => 'flatTime,LimitProjectBase=/LMOS/linux/filesystems/day0-fs'.
278
                                       ',mergePaths=+:tp5600:eb5600:pcp5700:etx86:common'.
283
                                       ',mergePaths=+:tp5600:eb5600:pcp5700:etx86:common'.
279
                                       ',processRipples',
284
                                       ',processRipples',
280
 
285
 
281
    'linux_kernel_gen1'               => 'flatTime,mergePaths=,processRipples,LimitProjectBase=/LMOS/linux/kernel',
286
    'linux_kernel_gen1'               => 'flatTime,mergePaths=,processRipples,LimitProjectBase=/LMOS/linux/kernel',
282
    'rt3070'                          => 'flatVersion',
287
    'rt3070'                          => 'flatVersion',
283
 
288
 
-
 
289
    'TRACS'                           => 'IgnoreMakeProject,DeleteFiles=*.plg',   # not tested
-
 
290
 
284
 
291
 
285
    'icl'                   => 'IgnoreProjectBase,',
292
    'icl'                   => 'IgnoreProjectBase,',
286
    'itso'                  => 'IgnoreProjectBase,',
293
    'itso'                  => 'IgnoreProjectBase,',
287
#    'daf_osa_mos'           => 'IgnoreProjectBase,',
294
#    'daf_osa_mos'           => 'IgnoreProjectBase,',
288
    'daf_utils_mos'         => 'IgnoreProjectBase,',
295
    'daf_utils_mos'         => 'IgnoreProjectBase,',
Line 306... Line 313...
306
 
313
 
307
my %notCots = (
314
my %notCots = (
308
    'isl'       => 1,
315
    'isl'       => 1,
309
);
316
);
310
 
317
 
311
my $ukHopsMode = 0;
-
 
312
my %ukHopsReleases = (
318
my %ukHopsReleases = (
313
    '6222'      => { name => 'MainLine', 'trunk' => 1 },
319
    '6222'      => { name => 'MainLine', 'trunk' => 1 },
314
    '14503'     => { name => 'Hops3' },
320
    '14503'     => { name => 'Hops3' },
315
    '21864'     => { name => 'Hops3.6' },
321
    '21864'     => { name => 'Hops3.6' },
316
    '22303'     => { name => 'Hops3.7' },
322
    '22303'     => { name => 'Hops3.7' },
317
    '17223'     => { name => 'Hops4' },
323
    '17223'     => { name => 'Hops4' },
-
 
324
 
-
 
325
    '19743' => {name => 'ITSO.2.1.4-MainlineOBE_Validator'},
-
 
326
    '11743' => {name => 'ITSO.2.1.3-MainlineOBE_Validator'},
-
 
327
    '21384' => {name => 'OBE2.1.3-GoAheadRelease-R4'},
-
 
328
    '23243' => {name => 'OBE2.1.3-GoAheadRelease-R4.5'},
-
 
329
    '23843' => {name => 'Validator.2.1.3-UKlive'},
-
 
330
    '15663' => {name => 'Validator.2.1.3-LegacyVersion_SSW_LMR'},
-
 
331
    '25183' => {name => 'ITSO.2.1.4-Validator-cmnITSO.V2src'},
-
 
332
    '24303' => {name => 'OBME_PSION-MAINLINE-ITSO.2.1.4'},
-
 
333
    '13143' => {name => 'OBME_PSION-MAINLINE-ITSO.2.1.2'},
-
 
334
    '24443' => {name => 'OBME_PSION-MAINLINE-ITSO.2.1.2-hot-fix'},
-
 
335
    '16023' => {name => 'OBME_PSION-TransportScotlandDLL'},
-
 
336
 
318
);
337
);
319
 
338
 
320
# The following packages will have the version in the specified release forced to be on the trunk
339
# The following packages will have the version in the specified release forced to be on the trunk
321
# A trunk will be forced and the version will be on it.
340
# A trunk will be forced and the version will be on it.
322
#   May only work if the version in the release is also a TIP
341
#   May only work if the version in the release is also a TIP
Line 494... Line 513...
494
        @ARGV = qw (
513
        @ARGV = qw (
495
                u-boot
514
                u-boot
496
                u-boot-hk
515
                u-boot-hk
497
                );
516
                );
498
 
517
 
499
    } elsif ( $opt_mergePackages eq 'dams5000' ) {
518
    } elsif ( $opt_mergePackages eq 'dams_gen1' ) {
500
        $opt_name = $opt_mergePackages;
519
        $opt_name = $opt_mergePackages;
501
        @ARGV = qw (
520
        @ARGV = qw (
502
                    dams_eb5600
521
                    dams_eb5600
503
                    dams_pcp5700
522
                    dams_pcp5700
504
                    dams_tp5600
523
                    dams_tp5600
505
                );
524
                );
506
 
525
 
507
    } elsif ( $opt_mergePackages eq 'linux_day0fs_5000' ) {
526
    } elsif ( $opt_mergePackages eq 'linux_day0fs_gen1' ) {
508
        $opt_name = $opt_mergePackages;
527
        $opt_name = $opt_mergePackages;
509
        @ARGV = qw (
528
        @ARGV = qw (
510
                    linux_day0fs_eb5600
529
                    linux_day0fs_eb5600
511
                    linux_day0fs_tp5600
530
                    linux_day0fs_tp5600
512
                    linux_day0fs_etx86
531
                    linux_day0fs_etx86
Line 611... Line 630...
611
            my $rv = scalar @va <=> scalar @vb;
630
            my $rv = scalar @va <=> scalar @vb;
612
            return $rv if ( $rv );
631
            return $rv if ( $rv );
613
 
632
 
614
            foreach my $ii ( 0 .. scalar @va )
633
            foreach my $ii ( 0 .. scalar @va )
615
            {
634
            {
-
 
635
                $va[$ii] = '' unless ( defined $va[$ii] );
-
 
636
                $vb[$ii] = '' unless ( defined $vb[$ii] );
-
 
637
                if ( ($va[$ii] =~ m~^\d+$~) && ($va[$ii] =~ m~^\d+$~)  )
-
 
638
                {
616
                $rv = $va[$ii] <=> $vb[$ii];
639
                    $rv = $va[$ii] <=> $vb[$ii];
-
 
640
                }
-
 
641
                else
-
 
642
                {
-
 
643
                    $rv = $va[$ii] cmp $vb[$ii];
-
 
644
                }
617
                return $rv if ( $rv );
645
                return $rv if ( $rv );
618
            }
646
            }
619
            return $rv;
647
            return $rv;
620
        }
648
        }
621
 
649
 
Line 908... Line 936...
908
            $opt_forceProjectBase = $1;
936
            $opt_forceProjectBase = $1;
909
            $opt_AllowMuliplePaths = 1;
937
            $opt_AllowMuliplePaths = 1;
910
            Message ("Force Project Base: $opt_forceProjectBase");
938
            Message ("Force Project Base: $opt_forceProjectBase");
911
        }
939
        }
912
 
940
 
-
 
941
 
913
        if ( $data =~ m~,LimitProjectBase=(.*?),~ ) {
942
        if ( $data =~ m~,LimitProjectBase=(.*?),~ ) {
914
            $opt_AllowMuliplePaths = 1;
943
            $opt_AllowMuliplePaths = 1;
915
            @opt_limitProjectBase = split(':', $1);
944
            @opt_limitProjectBase = split(':', $1);
916
            Message ("Limit Project Base: @opt_limitProjectBase");
945
            Message ("Limit Project Base: @opt_limitProjectBase");
917
        }
946
        }
Line 919... Line 948...
919
        if ( $data =~ m~,mergePaths=(.*?),~ ) {
948
        if ( $data =~ m~,mergePaths=(.*?),~ ) {
920
            @opt_mergePaths = split(':', $1);
949
            @opt_mergePaths = split(':', $1);
921
            Message ("Merge Paths: @opt_mergePaths");
950
            Message ("Merge Paths: @opt_mergePaths");
922
        }
951
        }
923
 
952
 
-
 
953
        if ( $data =~ m~,DeleteFiles=(.*?),~ ) {
-
 
954
            @opt_deleteFiles = split(':', $1);
-
 
955
            Message ("Delete Files: @opt_deleteFiles");
-
 
956
        }
-
 
957
        
924
        if ( index( $data, ',IgnoreProjectBase,' ) >= 0) {
958
        if ( index( $data, ',IgnoreProjectBase,' ) >= 0) {
925
            $opt_ignoreProjectBaseErrors = 1;
959
            $opt_ignoreProjectBaseErrors = 1;
926
            Message ("Ignore ProjectBase Errors");
960
            Message ("Ignore ProjectBase Errors");
927
        }
961
        }
928
 
962
 
Line 2217... Line 2251...
2217
        $rv = extractFilesFromClearCase( $data, $cc_path, $cc_label );
2251
        $rv = extractFilesFromClearCase( $data, $cc_path, $cc_label );
2218
        return $rv if ( $rv );
2252
        return $rv if ( $rv );
2219
    }
2253
    }
2220
 
2254
 
2221
    #
2255
    #
-
 
2256
    #   Delete specified files from the source tree
-
 
2257
    #
-
 
2258
    if ( @opt_deleteFiles )
-
 
2259
    {
-
 
2260
        my @args;
-
 
2261
        foreach my $delFileSpec ( @opt_deleteFiles )
-
 
2262
        {
-
 
2263
            Message ("Deleting files that match: $delFileSpec");
-
 
2264
            push @args, "--FilterIn=$delFileSpec";
-
 
2265
        }
-
 
2266
        my $search = JatsLocateFiles->new("--Recurse=1", @args );
-
 
2267
        my @rmFiles = $search->search($data->{ViewRoot});
-
 
2268
        foreach my $rmFile ( @rmFiles )
-
 
2269
        {
-
 
2270
            Information("Deleting: $rmFile");
-
 
2271
            unlink ( join ('/', $data->{ViewRoot}, $rmFile) )|| Warning "Cannot delete: $rmFile";
-
 
2272
        }
-
 
2273
    }
-
 
2274
 
-
 
2275
    #
2222
    #   Developers have been slack
2276
    #   Developers have been slack
2223
    #       Sometime the mark the source path as 'GMTPE2005'
2277
    #       Sometime the mark the source path as 'GMTPE2005'
2224
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
2278
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
2225
    #
2279
    #
2226
    #   Attempt to suck up empty directories below the specified
2280
    #   Attempt to suck up empty directories below the specified
Line 4267... Line 4321...
4267
#
4321
#
4268
sub createImages
4322
sub createImages
4269
{
4323
{
4270
 
4324
 
4271
    my $filebase = "${packageNames}";
4325
    my $filebase = "${packageNames}";
-
 
4326
    my $openOk;
-
 
4327
    foreach my $ii ( 0 .. 5 )
-
 
4328
    {
4272
    open (FH, '>', $cwd . "/$filebase.dot" ) or die "Cannot open output";
4329
        if (open (FH, '>', $cwd . "/$filebase.dot" ))
-
 
4330
        {
-
 
4331
            $openOk = 1;
-
 
4332
            last;
-
 
4333
        }
-
 
4334
        sleep (2);
-
 
4335
    }
-
 
4336
    unless ( $openOk )
-
 
4337
    {
-
 
4338
        Warning ("Cannot open image output: $filebase.dot");
-
 
4339
        return;
-
 
4340
    }
-
 
4341
 
-
 
4342
 
4273
    print FH "digraph \"${packageNames}\" {\n";
4343
    print FH "digraph \"${packageNames}\" {\n";
4274
    #print FH "rankdir=LR;\n";
4344
    #print FH "rankdir=LR;\n";
4275
    print FH "node[fontsize=16];\n";
4345
    print FH "node[fontsize=16];\n";
4276
    print FH "node[target=_graphviz];\n";
4346
    print FH "node[target=_graphviz];\n";
4277
#    print FH "subgraph cluster_A {\n";
4347
#    print FH "subgraph cluster_A {\n";
Line 4689... Line 4759...
4689
    $r1 =~ s~//~/~g;
4759
    $r1 =~ s~//~/~g;
4690
    $r1 =~ s~^/~~;
4760
    $r1 =~ s~^/~~;
4691
    $r1 =~ s~/$~~;
4761
    $r1 =~ s~/$~~;
4692
    $svnRepo = $opt_repo_base . $r1;
4762
    $svnRepo = $opt_repo_base . $r1;
4693
 
4763
 
4694
    Verbose( "Repo URL: $svnRepo");
4764
    Message( "Repo URL: $svnRepo");
4695
}
4765
}
4696
 
4766
 
4697
 
4767
 
4698
#-------------------------------------------------------------------------------
4768
#-------------------------------------------------------------------------------
4699
# Function        : getEssenialPackageVersions
4769
# Function        : getEssenialPackageVersions