Subversion Repositories DevTools

Rev

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

Rev 2764 Rev 2931
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;
-
 
90
my $opt_useTestRepo;
89
 
91
 
90
################################################################################
92
################################################################################
91
#   List of Projects Suffixes and Branch Names to be used within SVN
93
#   List of Projects Suffixes and Branch Names to be used within SVN
92
#
94
#
93
#       Name        - Name of branch for the project
95
#       Name        - Name of branch for the project
Line 141... Line 143...
141
    '.pxxx.sea'     => '.sea',
143
    '.pxxx.sea'     => '.sea',
142
    '.pxxx.syd'     => '.syd',
144
    '.pxxx.syd'     => '.syd',
143
    '.pxxx.sydddd'  => '.syd',
145
    '.pxxx.sydddd'  => '.syd',
144
    '.oslo'         => '.oso',
146
    '.oslo'         => '.oso',
145
    '.osl'          => '.oso',
147
    '.osl'          => '.oso',
-
 
148
    '.0x3'          => '.cr',
-
 
149
    '.0x4'          => '.cr',
-
 
150
    '.0x5'          => '.cr',
-
 
151
    '.0x13'         => '.cr',
146
);
152
);
147
 
153
 
148
my %specialPackages = (
154
my %specialPackages = (
149
    'core_devl'           =>  ',all,protected,',
155
    'core_devl'           =>  ',all,protected,',
150
    'daf_utils_mos'       => ',flat,',
156
    'daf_utils_mos'       => ',flat,',
Line 259... Line 265...
259
    'daf_br_th'                     => 'IgnoreBadPath,all,IgnoreMakeProject', # MakeProject Tested. Bad Paths not used
265
    'daf_br_th'                     => 'IgnoreBadPath,all,IgnoreMakeProject', # MakeProject Tested. Bad Paths not used
260
    'linux_kernel_bcp4600'          => 'ForceProjectBase=/LMOS/linux/kernel',
266
    'linux_kernel_bcp4600'          => 'ForceProjectBase=/LMOS/linux/kernel',
261
    'linux_kernel_viper'            => 'ForceProjectBase=/LMOS/linux/kernel',
267
    'linux_kernel_viper'            => 'ForceProjectBase=/LMOS/linux/kernel',
262
    'linux_kernel_cobra'            => 'ForceProjectBase=/LMOS/linux/kernel',
268
    'linux_kernel_cobra'            => 'ForceProjectBase=/LMOS/linux/kernel',
263
 
269
 
264
    'LinuxDrivers'                  => 'flatTime,LimitProjectBase=/LMOS/linux/drivers'.
270
    'LinuxDrivers'                  => 'flatTime,processRipples,LimitProjectBase=/LMOS/linux/drivers'.
265
                                       ',mergePaths=modules:bcp4600:cobra:eb5600:etx86:tp5600:viper',
271
                                       ',mergePaths=modules:bcp4600:cobra:eb5600:etx86:tp5600:viper',
266
 
272
 
267
    'flashCopier'                   => 'flatTime,LimitProjectBase=/LMOS/tools/flashCopier'.
273
    'flashCopier'                   => 'flatTime,LimitProjectBase=/LMOS/tools/flashCopier'.
268
                                       ',mergePaths=+:src:pcp5700:eb5600:tp5600',
274
                                       ',mergePaths=+:src:pcp5700:eb5600:tp5600',
269
 
275
 
270
    'u-boot'                        => 'flatTime,LimitProjectBase=/LMOS/linux/bootstrap/u-boot'.
276
    'u-boot'                        => 'flatTime,LimitProjectBase=/LMOS/linux/bootstrap/u-boot'.
271
                                       ',mergePaths=+:src:u-boot:u-boot-hk',
277
                                       ',mergePaths=+:src:u-boot:u-boot-hk',
272
 
278
 
273
    'dams5000'                      => 'flatTime,LimitProjectBase=/LMOS/apps/dams'.
279
    'dams_gen1'                      => 'flatTime,LimitProjectBase=/LMOS/apps/dams'.
274
                                       ',mergePaths=+:tp5600:eb5600:pcp5700:core:doc'.
280
                                       ',mergePaths=+:tp5600:eb5600:pcp5700:core:doc'.
275
                                       ',processRipples',
281
                                       ',processRipples',
276
 
282
 
277
    'linux_day0fs_5000'            => 'flatTime,LimitProjectBase=/LMOS/linux/filesystems/day0-fs'.
283
    'linux_day0fs_gen1'            => 'flatTime,LimitProjectBase=/LMOS/linux/filesystems/day0-fs'.
278
                                       ',mergePaths=+:tp5600:eb5600:pcp5700:etx86:common'.
284
                                       ',mergePaths=+:tp5600:eb5600:pcp5700:etx86:common'.
279
                                       ',processRipples',
285
                                       ',processRipples',
280
 
286
 
281
    'linux_kernel_gen1'               => 'flatTime,mergePaths=,processRipples,LimitProjectBase=/LMOS/linux/kernel',
287
    'linux_kernel_gen1'               => 'flatTime,mergePaths=,processRipples,LimitProjectBase=/LMOS/linux/kernel',
-
 
288
 
-
 
289
    'serpent'                         => 'flatTime,processRipples,LimitProjectBase=/LMOS/linux/kernel'.
-
 
290
                                         ',mergePaths=serpent-common:common:cobra:viper',
-
 
291
 
282
    'rt3070'                          => 'flatVersion',
292
    'rt3070'                          => 'flatVersion',
283
 
293
 
-
 
294
    'TRACS'                           => 'IgnoreMakeProject,DeleteFiles=*.plg',   # not tested
-
 
295
 
284
 
296
 
285
    'icl'                   => 'IgnoreProjectBase,',
297
    'icl'                   => 'IgnoreProjectBase,',
286
    'itso'                  => 'IgnoreProjectBase,',
298
    'itso'                  => 'IgnoreProjectBase,',
287
#    'daf_osa_mos'           => 'IgnoreProjectBase,',
299
#    'daf_osa_mos'           => 'IgnoreProjectBase,',
288
    'daf_utils_mos'         => 'IgnoreProjectBase,',
300
    'daf_utils_mos'         => 'IgnoreProjectBase,',
Line 299... Line 311...
299
    'linux_kernel_gen1' => {
311
    'linux_kernel_gen1' => {
300
            'linux_kernel_eb5600_2.6.21.1.0.cots' => '+:TP5600:EB5600:ETX86:common:packager.sflash:www.kernel.org:packager.grub',
312
            'linux_kernel_eb5600_2.6.21.1.0.cots' => '+:TP5600:EB5600:ETX86:common:packager.sflash:www.kernel.org:packager.grub',
301
            'linux_kernel_tp5600_2.6.21.1.0.cots' => '+:tp5600:eb5600:etx86:bcp4600:common:packager.sflash:www.kernel.org:packager.grub',
313
            'linux_kernel_tp5600_2.6.21.1.0.cots' => '+:tp5600:eb5600:etx86:bcp4600:common:packager.sflash:www.kernel.org:packager.grub',
302
            },
314
            },
303
 
315
 
-
 
316
    'serpent'   => {
-
 
317
        'linux_kernel_viper_2.6.24.6.0000.cots' => 'common:viper',
-
 
318
        'linux_kernel_viper_2.6.24.6.1000.cots' => 'serpent-common:cobra:viper',
-
 
319
 
-
 
320
    },
-
 
321
 
-
 
322
);
-
 
323
 
-
 
324
my %packageRippleControl = (
-
 
325
    'linux_drivers_etx86' => 'major',
-
 
326
    'linux_drivers_eb5600' => 'major',
-
 
327
    'linux_drivers_tp5600' => 'major',
304
);
328
);
305
 
329
 
306
 
330
 
307
my %notCots = (
331
my %notCots = (
308
    'isl'       => 1,
332
    'isl'       => 1,
309
);
333
);
310
 
334
 
311
my $ukHopsMode = 0;
-
 
312
my %ukHopsReleases = (
335
my %ukHopsReleases = (
313
    '6222'      => { name => 'MainLine', 'trunk' => 1 },
336
    '6222'      => { name => 'MainLine', 'trunk' => 1 },
314
    '14503'     => { name => 'Hops3' },
337
    '14503'     => { name => 'Hops3' },
315
    '21864'     => { name => 'Hops3.6' },
338
    '21864'     => { name => 'Hops3.6' },
316
    '22303'     => { name => 'Hops3.7' },
339
    '22303'     => { name => 'Hops3.7' },
317
    '17223'     => { name => 'Hops4' },
340
    '17223'     => { name => 'Hops4' },
-
 
341
 
-
 
342
#    '19743' => {name => 'ITSO.2.1.4-MainlineOBE_Validator'},
-
 
343
#    '11743' => {name => 'ITSO.2.1.3-MainlineOBE_Validator'},
-
 
344
#    '21384' => {name => 'OBE2.1.3-GoAheadRelease-R4'},
-
 
345
#    '23243' => {name => 'OBE2.1.3-GoAheadRelease-R4.5'},
-
 
346
#    '23843' => {name => 'Validator.2.1.3-UKlive'},
-
 
347
#    '15663' => {name => 'Validator.2.1.3-LegacyVersion_SSW_LMR'},
-
 
348
#    '25183' => {name => 'ITSO.2.1.4-Validator-cmnITSO.V2src'},
-
 
349
#    '24303' => {name => 'OBME_PSION-MAINLINE-ITSO.2.1.4'},
-
 
350
#    '13143' => {name => 'OBME_PSION-MAINLINE-ITSO.2.1.2'},
-
 
351
#    '24443' => {name => 'OBME_PSION-MAINLINE-ITSO.2.1.2-hot-fix'},
-
 
352
#    '16023' => {name => 'OBME_PSION-TransportScotlandDLL'},
-
 
353
 
318
);
354
);
319
 
355
 
320
# The following packages will have the version in the specified release forced to be on the trunk
356
# 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.
357
# 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
358
#   May only work if the version in the release is also a TIP
Line 414... Line 450...
414
                'postimage!'        => \$opt_postimage,
450
                'postimage!'        => \$opt_postimage,
415
                'workdir:s'         => \$opt_workDir,
451
                'workdir:s'         => \$opt_workDir,
416
                'relabel!'          => \$opt_relabel,
452
                'relabel!'          => \$opt_relabel,
417
                'svn!'              => \$opt_useSvn,
453
                'svn!'              => \$opt_useSvn,
418
                'testRmDatabase'    => \$opt_testRmDatabase,
454
                'testRmDatabase'    => \$opt_testRmDatabase,
419
                'fromSvn!'          => \$opt_extractFromSvn,
-
 
420
                'resume'            => \$opt_resume,
455
                'resume'            => \$opt_resume,
421
                'mergePackages:s'   => \$opt_mergePackages,
456
                'mergePackages:s'   => \$opt_mergePackages,
422
                'subdir:s'          => \$opt_repoSubdir,    # Subdir within repo
457
                'subdir:s'          => \$opt_repoSubdir,    # Subdir within repo
423
                
-
 
424
                'svn!'          => \$opt_useSvn,
-
 
425
                'testRmDatabase'    => \$opt_testRmDatabase,
-
 
426
                'fromSvn!'          => \$opt_extractFromSvn,
458
                'fromSvn!'          => \$opt_extractFromSvn,
-
 
459
                'testRepo!'         => \$opt_useTestRepo,
427
                );
460
                );
428
 
461
 
429
#
462
#
430
#   Process help and manual options
463
#   Process help and manual options
431
#
464
#
Line 494... Line 527...
494
        @ARGV = qw (
527
        @ARGV = qw (
495
                u-boot
528
                u-boot
496
                u-boot-hk
529
                u-boot-hk
497
                );
530
                );
498
 
531
 
499
    } elsif ( $opt_mergePackages eq 'dams5000' ) {
532
    } elsif ( $opt_mergePackages eq 'dams_gen1' ) {
500
        $opt_name = $opt_mergePackages;
533
        $opt_name = $opt_mergePackages;
501
        @ARGV = qw (
534
        @ARGV = qw (
502
                    dams_eb5600
535
                    dams_eb5600
503
                    dams_pcp5700
536
                    dams_pcp5700
504
                    dams_tp5600
537
                    dams_tp5600
505
                );
538
                );
506
 
539
 
507
    } elsif ( $opt_mergePackages eq 'linux_day0fs_5000' ) {
540
    } elsif ( $opt_mergePackages eq 'linux_day0fs_gen1' ) {
508
        $opt_name = $opt_mergePackages;
541
        $opt_name = $opt_mergePackages;
509
        @ARGV = qw (
542
        @ARGV = qw (
510
                    linux_day0fs_eb5600
543
                    linux_day0fs_eb5600
511
                    linux_day0fs_tp5600
544
                    linux_day0fs_tp5600
512
                    linux_day0fs_etx86
545
                    linux_day0fs_etx86
Line 519... Line 552...
519
                    linux_kernel_tp5600
552
                    linux_kernel_tp5600
520
                    linux_kernel_eb5600
553
                    linux_kernel_eb5600
521
                    linux_kernel_bcp4600
554
                    linux_kernel_bcp4600
522
                );
555
                );
523
 
556
 
-
 
557
    } elsif ( $opt_mergePackages eq 'serpent' ) {
-
 
558
        $opt_name = $opt_mergePackages;
-
 
559
        @ARGV = qw (
-
 
560
                    linux_kernel_viper
-
 
561
                    linux_kernel_cobra
-
 
562
                );
524
    } else
563
    } else
525
    {
564
    {
526
        Error ("Unknown Merge Package Name: $opt_mergePackages");
565
        Error ("Unknown Merge Package Name: $opt_mergePackages");
527
    }
566
    }
528
}
567
}
Line 611... Line 650...
611
            my $rv = scalar @va <=> scalar @vb;
650
            my $rv = scalar @va <=> scalar @vb;
612
            return $rv if ( $rv );
651
            return $rv if ( $rv );
613
 
652
 
614
            foreach my $ii ( 0 .. scalar @va )
653
            foreach my $ii ( 0 .. scalar @va )
615
            {
654
            {
-
 
655
                $va[$ii] = '' unless ( defined $va[$ii] );
-
 
656
                $vb[$ii] = '' unless ( defined $vb[$ii] );
-
 
657
                if ( ($va[$ii] =~ m~^\d+$~) && ($va[$ii] =~ m~^\d+$~)  )
-
 
658
                {
616
                $rv = $va[$ii] <=> $vb[$ii];
659
                    $rv = $va[$ii] <=> $vb[$ii];
-
 
660
                }
-
 
661
                else
-
 
662
                {
-
 
663
                    $rv = $va[$ii] cmp $vb[$ii];
-
 
664
                }
617
                return $rv if ( $rv );
665
                return $rv if ( $rv );
618
            }
666
            }
619
            return $rv;
667
            return $rv;
620
        }
668
        }
621
 
669
 
Line 885... Line 933...
885
            Message ("Flatten import tree. Sort by Version");
933
            Message ("Flatten import tree. Sort by Version");
886
            $opt_flat = 1;
934
            $opt_flat = 1;
887
            $flatMode = 2;          # By Version
935
            $flatMode = 2;          # By Version
888
            $opt_processRipples = 0;
936
            $opt_processRipples = 0;
889
        }
937
        }
890
        
-
 
891
 
938
 
892
        if ( index( $data, ',processRipples,' ) >= 0) {
939
        if ( index( $data, ',processRipples,' ) >= 0) {
893
            $opt_processRipples = 1;
940
            $opt_processRipples = 1;
894
        }
941
        }
895
 
942
 
Line 908... Line 955...
908
            $opt_forceProjectBase = $1;
955
            $opt_forceProjectBase = $1;
909
            $opt_AllowMuliplePaths = 1;
956
            $opt_AllowMuliplePaths = 1;
910
            Message ("Force Project Base: $opt_forceProjectBase");
957
            Message ("Force Project Base: $opt_forceProjectBase");
911
        }
958
        }
912
 
959
 
-
 
960
 
913
        if ( $data =~ m~,LimitProjectBase=(.*?),~ ) {
961
        if ( $data =~ m~,LimitProjectBase=(.*?),~ ) {
914
            $opt_AllowMuliplePaths = 1;
962
            $opt_AllowMuliplePaths = 1;
915
            @opt_limitProjectBase = split(':', $1);
963
            @opt_limitProjectBase = split(':', $1);
916
            Message ("Limit Project Base: @opt_limitProjectBase");
964
            Message ("Limit Project Base: @opt_limitProjectBase");
917
        }
965
        }
Line 919... Line 967...
919
        if ( $data =~ m~,mergePaths=(.*?),~ ) {
967
        if ( $data =~ m~,mergePaths=(.*?),~ ) {
920
            @opt_mergePaths = split(':', $1);
968
            @opt_mergePaths = split(':', $1);
921
            Message ("Merge Paths: @opt_mergePaths");
969
            Message ("Merge Paths: @opt_mergePaths");
922
        }
970
        }
923
 
971
 
-
 
972
        if ( $data =~ m~,DeleteFiles=(.*?),~ ) {
-
 
973
            @opt_deleteFiles = split(':', $1);
-
 
974
            Message ("Delete Files: @opt_deleteFiles");
-
 
975
        }
-
 
976
        
924
        if ( index( $data, ',IgnoreProjectBase,' ) >= 0) {
977
        if ( index( $data, ',IgnoreProjectBase,' ) >= 0) {
925
            $opt_ignoreProjectBaseErrors = 1;
978
            $opt_ignoreProjectBaseErrors = 1;
926
            Message ("Ignore ProjectBase Errors");
979
            Message ("Ignore ProjectBase Errors");
927
        }
980
        }
928
 
981
 
Line 1744... Line 1797...
1744
    {
1797
    {
1745
        my $ep = $versions{$entry};
1798
        my $ep = $versions{$entry};
1746
        if ( defined $ep->{buildVersion} )
1799
        if ( defined $ep->{buildVersion} )
1747
        {
1800
        {
1748
            my $suffix = $ep->{suffix};
1801
            my $suffix = $ep->{suffix};
-
 
1802
            my $pname = $ep->{name};
-
 
1803
            $suffix = $pname . $suffix;
-
 
1804
 
1749
            my ($major, $minor, $patch, $build) = @{$ep->{buildVersion}};
1805
            my ($major, $minor, $patch, $build) = @{$ep->{buildVersion}};
1750
#print "--- $major, $minor, $patch, $build, $suffix\n";
1806
#print "--- $major, $minor, $patch, $build, $suffix\n";
-
 
1807
 
-
 
1808
            my $key;
-
 
1809
            my $type = 'patch';
-
 
1810
            $type = $packageRippleControl{$pname} if ( exists  $packageRippleControl{$pname});
-
 
1811
            if ( $type eq 'patch' ) {
-
 
1812
                $key = "$major.$minor.$patch";
-
 
1813
#                $build = $build;
-
 
1814
 
-
 
1815
            } elsif ( $type eq 'minor' ) {
-
 
1816
                $key = "$major.$minor";
-
 
1817
#                $build = ($patch * 1000) + $build;
-
 
1818
 
-
 
1819
            } elsif ( $type eq 'major' ) {
-
 
1820
                $key = "$major";
-
 
1821
#                $build = ($minor * 1000000) + ($patch * 1000) + $build;
-
 
1822
            } else {
-
 
1823
                Error ("Invalid type in packageRippleControl for package $pname: $type");
-
 
1824
            }
-
 
1825
 
1751
            $rippleVersions{$suffix}{"$major.$minor.$patch"}{count}++;
1826
            $rippleVersions{$suffix}{$key}{count}++;
1752
            my $rp = $rippleVersions{$suffix}{"$major.$minor.$patch"};
1827
            my $rp = $rippleVersions{$suffix}{$key};
1753
            $rp->{list}{$entry} = 1;
1828
            $rp->{list}{$entry} = $versions{$entry}{version};
1754
 
1829
 
1755
            next if ( $ep->{badVcsTag} );
1830
#            next if ( $ep->{badVcsTag} );
1756
            next if ( $ep->{locked} eq 'N');
1831
#            next if ( $ep->{locked} eq 'N');
-
 
1832
 
1757
            if (!defined ($rp->{min}) || $rp->{min} > $build )
1833
#            if (!defined ($rp->{min}) || $rp->{min} > $build )
1758
            {
1834
#            {
1759
                $rp->{pvid} = $entry;
1835
#                $rp->{pvid} = $entry;
1760
                $rp->{min} = $build;
1836
#                $rp->{min} = $build;
1761
            }
1837
#            }
1762
        }
1838
        }
1763
    }
1839
    }
1764
#            DebugDumpData("rippleVersions", \%rippleVersions );
1840
#            DebugDumpData("rippleVersions", \%rippleVersions );
1765
 
1841
 
1766
    while ( my($suffix, $e1) = each %rippleVersions )
1842
    while ( my($suffix, $e1) = each %rippleVersions )
1767
    {
1843
    {
-
 
1844
#DebugDumpData("rippleVersions. Suffix , e1", $suffix, $e1 );
-
 
1845
        
1768
        while ( my( $mmp, $e2) = each %{$e1} )
1846
        while ( my( $mmp, $e2) = each %{$e1} )
1769
        {
1847
        {
1770
            next unless ( exists  $e2->{pvid} );
1848
#            next unless ( exists  $e2->{pvid} );
1771
            my $entry = $e2->{pvid};
1849
#            my $entry = $e2->{pvid};
1772
            if ( !exists $versions{$entry} )
1850
#            if ( !exists $versions{$entry} )
1773
            {
1851
#            {
1774
                Error ("Internal: Expected entry not found: $entry, $mmp");
1852
#                Error ("Internal: Expected entry not found: $entry, $mmp");
1775
            }
1853
#            }
1776
 
1854
#
1777
            $versions{$entry}{keepLowestRipple} = 1;
1855
#            $versions{$entry}{keepLowestRipple} = 1;
1778
#print "--- Keep Riple $versions{$entry}{vname}\n";
1856
#print "--- Keep Ripple: $versions{$entry}{name} $versions{$entry}{vname}\n";
1779
 
1857
 
1780
            #
1858
            #
1781
            #   Update entry with list of associated ripples, removing lowest
1859
            #   Update entry with list of associated ripples, removing lowest
1782
            #
1860
            #
-
 
1861
            my @rippleList = sort {$e2->{list}{$a} cmp $e2->{list}{$b}} keys %{$e2->{list}};
1783
            delete $e2->{list}{$entry};
1862
            my $firstEntry = shift @rippleList;
1784
            my @rippleList = sort keys %{$e2->{list}};
1863
            $versions{$firstEntry}{keepLowestRipple} = 1;
-
 
1864
#print "--- Keep Lowest: $versions{$firstEntry}{name} $versions{$firstEntry}{vname}\n";
-
 
1865
 
1785
            if ( @rippleList)
1866
            if ( @rippleList)
1786
            {
1867
            {
1787
#DebugDumpData("LIST: $entry", $e2->{list}, \@rippleList  );
1868
#DebugDumpData("LIST: $entry", $e2->{list}, \@rippleList  );
1788
                @{$versions{$entry}{rippleList}} = @rippleList;
1869
                @{$versions{$firstEntry}{rippleList}} = @rippleList;
-
 
1870
 
-
 
1871
#                foreach my $pvid ( @rippleList )
-
 
1872
#                {
-
 
1873
#                    print "----- $versions{$pvid}{name} $versions{$pvid}{vname}\n";
-
 
1874
#                }
1789
            }
1875
            }
1790
        }
1876
        }
1791
    }
1877
    }
-
 
1878
#    Error ("Just Testing");
1792
}
1879
}
1793
 
1880
 
1794
#-------------------------------------------------------------------------------
1881
#-------------------------------------------------------------------------------
1795
# Function        : processBranch
1882
# Function        : processBranch
1796
#
1883
#
Line 2217... Line 2304...
2217
        $rv = extractFilesFromClearCase( $data, $cc_path, $cc_label );
2304
        $rv = extractFilesFromClearCase( $data, $cc_path, $cc_label );
2218
        return $rv if ( $rv );
2305
        return $rv if ( $rv );
2219
    }
2306
    }
2220
 
2307
 
2221
    #
2308
    #
-
 
2309
    #   Delete specified files from the source tree
-
 
2310
    #
-
 
2311
    if ( @opt_deleteFiles )
-
 
2312
    {
-
 
2313
        my @args;
-
 
2314
        foreach my $delFileSpec ( @opt_deleteFiles )
-
 
2315
        {
-
 
2316
            Message ("Deleting files that match: $delFileSpec");
-
 
2317
            push @args, "--FilterIn=$delFileSpec";
-
 
2318
        }
-
 
2319
        my $search = JatsLocateFiles->new("--Recurse=1", @args );
-
 
2320
        my @rmFiles = $search->search($data->{ViewRoot});
-
 
2321
        foreach my $rmFile ( @rmFiles )
-
 
2322
        {
-
 
2323
            Information("Deleting: $rmFile");
-
 
2324
            unlink ( join ('/', $data->{ViewRoot}, $rmFile) )|| Warning "Cannot delete: $rmFile";
-
 
2325
        }
-
 
2326
    }
-
 
2327
 
-
 
2328
    #
2222
    #   Developers have been slack
2329
    #   Developers have been slack
2223
    #       Sometime the mark the source path as 'GMTPE2005'
2330
    #       Sometime the mark the source path as 'GMTPE2005'
2224
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
2331
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
2225
    #
2332
    #
2226
    #   Attempt to suck up empty directories below the specified
2333
    #   Attempt to suck up empty directories below the specified
Line 3015... Line 3122...
3015
 
3122
 
3016
    #
3123
    #
3017
    #   Create a nice name for the import
3124
    #   Create a nice name for the import
3018
    #
3125
    #
3019
    my $import_label = saneLabel($entry);
3126
    my $import_label = saneLabel($entry);
3020
    
-
 
3021
 
3127
 
3022
    $data->{ViewRoot} = $opt_name ? $opt_name : $import_label;
3128
    $data->{ViewRoot} = ( defined $opt_name && ! defined $opt_mergePackages )? $opt_name : $import_label;
3023
    $data->{ViewPath} =  $data->{ViewRoot};
3129
    $data->{ViewPath} =  $data->{ViewRoot};
3024
    $data->{ViewPath} =~  tr~/~/~s;
3130
    $data->{ViewPath} =~  tr~/~/~s;
3025
 
3131
    
3026
    if ( $opt_reuse && -d $data->{ViewPath}  )
3132
    if ( $opt_reuse && -d $data->{ViewPath}  )
3027
    {
3133
    {
3028
        Message ("Reusing view: $import_label");
3134
        Message ("Reusing view: $import_label");
3029
        return 0;
3135
        return 0;
3030
    }
3136
    }
Line 3856... Line 3962...
3856
                    #
3962
                    #
3857
                    #   Some developers have a 'special' package version
3963
                    #   Some developers have a 'special' package version
3858
                    #   We really need to ignore them
3964
                    #   We really need to ignore them
3859
                    #
3965
                    #
3860
                    next if ( $pkg_ver eq '23.23.23.ssw' );
3966
                    next if ( $pkg_ver eq '23.23.23.ssw' );
3861
                    
-
 
-
 
3967
 
3862
                    #
3968
                    #
3863
                    #   Add data to the hash
3969
                    #   Add data to the hash
3864
                    #       Remove entries that address themselves
3970
                    #       Remove entries that address themselves
3865
                    #
3971
                    #
3866
                    push (@{$versions{$last_pv_id}{next}}, $pv_id) unless ($pv_id == $last_pv_id || $last_pv_id == 0) ;
3972
                    push (@{$versions{$last_pv_id}{next}}, $pv_id) unless ($pv_id == $last_pv_id || $last_pv_id == 0) ;
Line 4267... Line 4373...
4267
#
4373
#
4268
sub createImages
4374
sub createImages
4269
{
4375
{
4270
 
4376
 
4271
    my $filebase = "${packageNames}";
4377
    my $filebase = "${packageNames}";
-
 
4378
    my $openOk;
-
 
4379
    foreach my $ii ( 0 .. 5 )
-
 
4380
    {
4272
    open (FH, '>', $cwd . "/$filebase.dot" ) or die "Cannot open output";
4381
        if (open (FH, '>', $cwd . "/$filebase.dot" ))
-
 
4382
        {
-
 
4383
            $openOk = 1;
-
 
4384
            last;
-
 
4385
        }
-
 
4386
        sleep (2);
-
 
4387
    }
-
 
4388
    unless ( $openOk )
-
 
4389
    {
-
 
4390
        Warning ("Cannot open image output: $filebase.dot");
-
 
4391
        return;
-
 
4392
    }
-
 
4393
 
-
 
4394
 
4273
    print FH "digraph \"${packageNames}\" {\n";
4395
    print FH "digraph \"${packageNames}\" {\n";
4274
    #print FH "rankdir=LR;\n";
4396
    #print FH "rankdir=LR;\n";
4275
    print FH "node[fontsize=16];\n";
4397
    print FH "node[fontsize=16];\n";
4276
    print FH "node[target=_graphviz];\n";
4398
    print FH "node[target=_graphviz];\n";
4277
#    print FH "subgraph cluster_A {\n";
4399
#    print FH "subgraph cluster_A {\n";
Line 4671... Line 4793...
4671
    $opt_vobMap = $ScmRepoMap{$packageNames}{repo}
4793
    $opt_vobMap = $ScmRepoMap{$packageNames}{repo}
4672
        if (exists $ScmRepoMap{$packageNames});
4794
        if (exists $ScmRepoMap{$packageNames});
4673
 
4795
 
4674
    $opt_protected = $ScmRepoMap{$packageNames}{protected}
4796
    $opt_protected = $ScmRepoMap{$packageNames}{protected}
4675
        if (exists $ScmRepoMap{$packageNames}{protected});
4797
        if (exists $ScmRepoMap{$packageNames}{protected});
-
 
4798
 
-
 
4799
    $opt_vobMap = '' if ( $opt_repoSubdir );
-
 
4800
 
4676
    #
4801
    #
4677
    #   Free the memory
4802
    #   Free the memory
4678
    #
4803
    #
4679
    %ScmRepoMap = ();
4804
    %ScmRepoMap = ();
4680
 
4805
 
4681
    #
4806
    #
4682
    #   Calculate Target Repo
4807
    #   Calculate Target Repo
4683
    #
4808
    #
4684
    Warning ("No VOB Mapping found")
4809
    Warning ("No VOB Mapping found")
4685
        unless ($opt_vobMap);
4810
        unless ($opt_vobMap || ($opt_repoSubdir && $opt_repo));
4686
    Error("No repository specified. ie -repo=DevTools or -repo=COTS")
4811
    Error("No repository specified. ie -repo=DevTools or -repo=COTS")
4687
        unless ( $opt_repo || $opt_vobMap );
4812
        unless ( $opt_repo || $opt_vobMap );
4688
    my $r1 = ($opt_repo || '') . '/' . ($opt_vobMap || '') . '/' . ($opt_repoSubdir || '') ;
4813
    my $r1 = ($opt_repo || '') . '/' . ($opt_vobMap || '') . '/' . ($opt_repoSubdir || '') ;
-
 
4814
    $r1 = 'Import_test/' . $r1 if ( $opt_useTestRepo );
4689
    $r1 =~ s~//~/~g;
4815
    $r1 =~ s~//~/~g;
4690
    $r1 =~ s~^/~~;
4816
    $r1 =~ s~^/~~;
4691
    $r1 =~ s~/$~~;
4817
    $r1 =~ s~/$~~;
4692
    $svnRepo = $opt_repo_base . $r1;
4818
    $svnRepo = $opt_repo_base . $r1;
4693
 
4819
 
4694
    Verbose( "Repo URL: $svnRepo");
4820
    Message( "Repo URL: $svnRepo");
4695
}
4821
}
4696
 
4822
 
4697
 
4823
 
4698
#-------------------------------------------------------------------------------
4824
#-------------------------------------------------------------------------------
4699
# Function        : getEssenialPackageVersions
4825
# Function        : getEssenialPackageVersions
Line 4906... Line 5032...
4906
        } elsif ( $entry->{fromPath} =~ m~/branches/(.*)~ ) {
5032
        } elsif ( $entry->{fromPath} =~ m~/branches/(.*)~ ) {
4907
            $fromBranch = $1;
5033
            $fromBranch = $1;
4908
        }
5034
        }
4909
 
5035
 
4910
        # largest Rev number on branch
5036
        # largest Rev number on branch
4911
        if ( exists $svnData{max}{$fromBranch} )
5037
        if ( exists $svnData{max} && exists $svnData{max}{$fromBranch} )
4912
        {
5038
        {
4913
            if ( $svnData{max}{$fromBranch}{rev} <  $entry->{fromRev} )
5039
            if ( $svnData{max}{$fromBranch}{rev} <  $entry->{fromRev} )
4914
            {
5040
            {
4915
                $svnData{max}{$fromBranch}{rev} =  $entry->{fromRev};
5041
                $svnData{max}{$fromBranch}{rev} =  $entry->{fromRev};
4916
                $svnData{max}{$fromBranch}{name} = $name;
5042
                $svnData{max}{$fromBranch}{name} = $name;
Line 5126... Line 5252...
5126
    -workdir=path      - Use for temp storage (def:/work)
5252
    -workdir=path      - Use for temp storage (def:/work)
5127
    -delete            - Delete SVN package before test
5253
    -delete            - Delete SVN package before test
5128
    -[no]relabel       - Attempt to relabel dirs in packages that don't extract
5254
    -[no]relabel       - Attempt to relabel dirs in packages that don't extract
5129
    -testRmDatabase    - Use test database
5255
    -testRmDatabase    - Use test database
5130
    -[no]fromSvn       - Also extract packages from SVN
5256
    -[no]fromSvn       - Also extract packages from SVN
-
 
5257
    -[no]testRepo      - Force use of a test repository.
5131
 
5258
 
5132
=head1 OPTIONS
5259
=head1 OPTIONS
5133
 
5260
 
5134
=over 8
5261
=over 8
5135
 
5262