Subversion Repositories DevTools

Rev

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

Rev 2764 Rev 2931
Line 50... Line 50...
50
my $opt_help = 0;
50
my $opt_help = 0;
51
my $opt_manual = 0;
51
my $opt_manual = 0;
52
my $opt_verbose = 0;
52
my $opt_verbose = 0;
53
my $opt_repo_base = 'AUPERASVN01/';
53
my $opt_repo_base = 'AUPERASVN01/';
54
my $opt_repo = '';
54
my $opt_repo = '';
-
 
55
my $opt_repoSubdir = '';
55
my $opt_flat;
56
my $opt_flat;
56
my $opt_test;
57
my $opt_test;
57
my $opt_reuse;
58
my $opt_reuse = 0;
58
my $opt_age;
59
my $opt_age;
59
my $opt_dump = 0;
60
my $opt_dump = 0;
60
my $opt_images = 0;
61
my $opt_images = 0;
61
my $opt_retaincount = 2;
62
my $opt_retaincount = 2;
62
my $opt_pruneModeString;
63
my $opt_pruneModeString;
Line 70... Line 71...
70
my $opt_preserveProjectBase;
71
my $opt_preserveProjectBase;
71
my $opt_ignoreProjectBaseErrors;
72
my $opt_ignoreProjectBaseErrors;
72
my $opt_ignoreMakeProjectErrors;
73
my $opt_ignoreMakeProjectErrors;
73
my $opt_forceProjectBase;
74
my $opt_forceProjectBase;
74
my @opt_limitProjectBase;
75
my @opt_limitProjectBase;
-
 
76
my @opt_mergePaths;
75
my $opt_ignoreBadPaths;
77
my $opt_ignoreBadPaths;
76
my $opt_delete;
78
my $opt_delete;
77
my $opt_recentAge = 14;             # Days
79
my $opt_recentAge = 14;             # Days
78
my $opt_relabel = 0;
80
my $opt_relabel = 0;
79
my $opt_protected;
81
my $opt_protected;
80
my $opt_useSvn = 1;
82
my $opt_useSvn = 1;
81
my $opt_testRmDatabase;
83
my $opt_testRmDatabase;
82
my $opt_extractFromSvn;
84
my $opt_extractFromSvn;
83
my $opt_AllowMuliplePaths = 1;      #29-Nov-2012
85
my $opt_AllowMuliplePaths = 1;      #29-Nov-2012
84
my $opt_resume;
86
my $opt_resume;
-
 
87
my $opt_processRipples = 1;
-
 
88
my $opt_mergePackages;
-
 
89
my @opt_deleteFiles;
-
 
90
my $opt_PatchIsaRipple;
85
 
91
 
86
################################################################################
92
################################################################################
87
#   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
88
#
94
#
89
#       Name        - Name of branch for the project
95
#       Name        - Name of branch for the project
Line 137... Line 143...
137
    '.pxxx.sea'     => '.sea',
143
    '.pxxx.sea'     => '.sea',
138
    '.pxxx.syd'     => '.syd',
144
    '.pxxx.syd'     => '.syd',
139
    '.pxxx.sydddd'  => '.syd',
145
    '.pxxx.sydddd'  => '.syd',
140
    '.oslo'         => '.oso',
146
    '.oslo'         => '.oso',
141
    '.osl'          => '.oso',
147
    '.osl'          => '.oso',
-
 
148
    '.0x3'          => '.cr',
-
 
149
    '.0x4'          => '.cr',
-
 
150
    '.0x5'          => '.cr',
-
 
151
    '.0x13'         => '.cr',
142
);
152
);
143
 
153
 
144
my %specialPackages = (
154
my %specialPackages = (
145
    'core_devl'           =>  ',all,protected,',
155
    'core_devl'           =>  ',all,protected,',
146
    'daf_utils_mos'       => ',flat,',
156
    'daf_utils_mos'       => ',flat,',
Line 255... Line 265...
255
    '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
256
    'linux_kernel_bcp4600'          => 'ForceProjectBase=/LMOS/linux/kernel',
266
    'linux_kernel_bcp4600'          => 'ForceProjectBase=/LMOS/linux/kernel',
257
    'linux_kernel_viper'            => 'ForceProjectBase=/LMOS/linux/kernel',
267
    'linux_kernel_viper'            => 'ForceProjectBase=/LMOS/linux/kernel',
258
    'linux_kernel_cobra'            => 'ForceProjectBase=/LMOS/linux/kernel',
268
    'linux_kernel_cobra'            => 'ForceProjectBase=/LMOS/linux/kernel',
259
 
269
 
-
 
270
    'LinuxDrivers'                  => 'flatTime,processRipples,No-PatchIsaRipple,LimitProjectBase=/LMOS/linux/drivers'.
-
 
271
                                       ',mergePaths=modules:bcp4600:cobra:eb5600:etx86:tp5600:viper',
-
 
272
 
-
 
273
    'flashCopier'                   => 'flatTime,LimitProjectBase=/LMOS/tools/flashCopier'.
-
 
274
                                       ',mergePaths=+:src:pcp5700:eb5600:tp5600',
-
 
275
 
-
 
276
    'u-boot'                        => 'flatTime,LimitProjectBase=/LMOS/linux/bootstrap/u-boot'.
-
 
277
                                       ',mergePaths=+:src:u-boot:u-boot-hk',
-
 
278
 
-
 
279
    'dams_gen1'                      => 'flatTime,LimitProjectBase=/LMOS/apps/dams'.
-
 
280
                                       ',mergePaths=+:tp5600:eb5600:pcp5700:core:doc'.
-
 
281
                                       ',processRipples',
-
 
282
 
-
 
283
    'linux_day0fs_gen1'            => 'flatTime,LimitProjectBase=/LMOS/linux/filesystems/day0-fs'.
-
 
284
                                       ',mergePaths=+:tp5600:eb5600:pcp5700:etx86:common'.
-
 
285
                                       ',processRipples',
-
 
286
 
-
 
287
    'linux_kernel_gen1'               => 'flatTime,mergePaths=,processRipples,LimitProjectBase=/LMOS/linux/kernel',
-
 
288
    'rt3070'                          => 'flatVersion',
-
 
289
 
-
 
290
    'TRACS'                           => 'IgnoreMakeProject,DeleteFiles=*.plg',   # not tested
-
 
291
 
260
 
292
 
261
    'icl'                   => 'IgnoreProjectBase,',
293
    'icl'                   => 'IgnoreProjectBase,',
262
    'itso'                  => 'IgnoreProjectBase,',
294
    'itso'                  => 'IgnoreProjectBase,',
263
#    'daf_osa_mos'           => 'IgnoreProjectBase,',
295
#    'daf_osa_mos'           => 'IgnoreProjectBase,',
264
    'daf_utils_mos'         => 'IgnoreProjectBase,',
296
    'daf_utils_mos'         => 'IgnoreProjectBase,',
Line 267... Line 299...
267
#    'mos_fonts'             => 'IgnoreProjectBase,',
299
#    'mos_fonts'             => 'IgnoreProjectBase,',
268
#    'sntp'                  => 'IgnoreProjectBase,',
300
#    'sntp'                  => 'IgnoreProjectBase,',
269
#    'time_it'               => 'IgnoreProjectBase,',
301
#    'time_it'               => 'IgnoreProjectBase,',
270
);
302
);
271
 
303
 
-
 
304
 
-
 
305
my %mergePathExtended = (
-
 
306
 
-
 
307
    'linux_kernel_gen1' => {
-
 
308
            'linux_kernel_eb5600_2.6.21.1.0.cots' => '+:TP5600:EB5600:ETX86:common:packager.sflash:www.kernel.org:packager.grub',
-
 
309
            'linux_kernel_tp5600_2.6.21.1.0.cots' => '+:tp5600:eb5600:etx86:bcp4600:common:packager.sflash:www.kernel.org:packager.grub',
-
 
310
            },
-
 
311
 
-
 
312
);
-
 
313
 
-
 
314
my %packageRippleControl = (
-
 
315
    'linux_drivers_etx86' => 'major',
-
 
316
    'linux_drivers_eb5600' => 'major',
-
 
317
    'linux_drivers_tp5600' => 'major',
-
 
318
);
-
 
319
 
-
 
320
 
272
my %notCots = (
321
my %notCots = (
273
    'isl'       => 1,
322
    'isl'       => 1,
274
);
323
);
275
 
324
 
276
my $ukHopsMode = 0;
-
 
277
my %ukHopsReleases = (
325
my %ukHopsReleases = (
278
    '6222'      => { name => 'MainLine', 'trunk' => 1 },
326
    '6222'      => { name => 'MainLine', 'trunk' => 1 },
279
    '14503'     => { name => 'Hops3' },
327
    '14503'     => { name => 'Hops3' },
280
    '21864'     => { name => 'Hops3.6' },
328
    '21864'     => { name => 'Hops3.6' },
281
    '22303'     => { name => 'Hops3.7' },
329
    '22303'     => { name => 'Hops3.7' },
282
    '17223'     => { name => 'Hops4' },
330
    '17223'     => { name => 'Hops4' },
-
 
331
 
-
 
332
    '19743' => {name => 'ITSO.2.1.4-MainlineOBE_Validator'},
-
 
333
    '11743' => {name => 'ITSO.2.1.3-MainlineOBE_Validator'},
-
 
334
    '21384' => {name => 'OBE2.1.3-GoAheadRelease-R4'},
-
 
335
    '23243' => {name => 'OBE2.1.3-GoAheadRelease-R4.5'},
-
 
336
    '23843' => {name => 'Validator.2.1.3-UKlive'},
-
 
337
    '15663' => {name => 'Validator.2.1.3-LegacyVersion_SSW_LMR'},
-
 
338
    '25183' => {name => 'ITSO.2.1.4-Validator-cmnITSO.V2src'},
-
 
339
    '24303' => {name => 'OBME_PSION-MAINLINE-ITSO.2.1.4'},
-
 
340
    '13143' => {name => 'OBME_PSION-MAINLINE-ITSO.2.1.2'},
-
 
341
    '24443' => {name => 'OBME_PSION-MAINLINE-ITSO.2.1.2-hot-fix'},
-
 
342
    '16023' => {name => 'OBME_PSION-TransportScotlandDLL'},
-
 
343
 
283
);
344
);
284
 
345
 
285
# The following packages will have the version in the specified release forced to be on the trunk
346
# The following packages will have the version in the specified release forced to be on the trunk
286
# A trunk will be forced and the version will be on it.
347
# A trunk will be forced and the version will be on it.
287
#   May only work if the version in the release is also a TIP
348
#   May only work if the version in the release is also a TIP
Line 322... Line 383...
322
my $globalError;
383
my $globalError;
323
my @unknownProjects;
384
my @unknownProjects;
324
my %knownProjects;
385
my %knownProjects;
325
my $badSingletonCount = 0;
386
my $badSingletonCount = 0;
326
my @flatOrder;
387
my @flatOrder;
-
 
388
my $flatMode = 0;
327
my $pruneMode;
389
my $pruneMode;
328
my $pruneModeString;
390
my $pruneModeString;
329
my $threadId = 0;
391
my $threadId = 0;
330
my $threadCount;
392
my $threadCount;
331
my %tipVersions;
393
my %tipVersions;
Line 355... Line 417...
355
 
417
 
356
our $GBE_RM_URL;
418
our $GBE_RM_URL;
357
my $UNIX = $ENV{'GBE_UNIX'};
419
my $UNIX = $ENV{'GBE_UNIX'};
358
 
420
 
359
my $result = GetOptions (
421
my $result = GetOptions (
360
                "help+"             => \$opt_help,          # flag, multiple use allowed
422
                'help+'             => \$opt_help,          # flag, multiple use allowed
361
                "manual:3"          => \$opt_help,
423
                'manual:3'          => \$opt_help,
362
                "verbose:+"         => \$opt_verbose,       # Versose
424
                'verbose:+'         => \$opt_verbose,       # Versose
363
                "repository:s"      => \$opt_repo,          # Name of repository
425
                'repository:s'      => \$opt_repo,          # Name of repository
364
                'rbase:s'           => \$opt_repo_base,     # Base of the repo
426
                'rbase:s'           => \$opt_repo_base,     # Base of the repo
365
                "flat!"             => \$opt_flat,          # Flat structure
427
                'flat!'             => \$opt_flat,          # Flat structure
366
                "test!"             => \$opt_test,          # Test operations
428
                'test!'             => \$opt_test,          # Test operations
367
                "reuse!"            => \$opt_reuse,         # Reuse ClearCase views
429
                'reuse:1'           => \$opt_reuse,         # Reuse ClearCase views 0:None, 1=Retain, 2=Use+Delete
368
                "age:i"             => \$opt_age,           # Only recent versions
430
                'age:i'             => \$opt_age,           # Only recent versions
369
                "dump:1"            => \$opt_dump,          # Dump Data
431
                'dump:1'            => \$opt_dump,          # Dump Data
370
                "images:1"          => \$opt_images,        # Create DOT images
432
                'images:1'          => \$opt_images,        # Create DOT images
371
                "retain:i"          => \$opt_retaincount,   # Retain N packages
433
                'retain:i'          => \$opt_retaincount,   # Retain N packages
372
                "pruneMode:s"       => \$opt_pruneModeString,
434
                'pruneMode:s'       => \$opt_pruneModeString,
373
                "listtags:i"        => \$opt_listTags,
435
                'listtags:i'        => \$opt_listTags,
374
                "name:s"            => \$opt_name,          # Alternate output
436
                'name:s'            => \$opt_name,          # Alternate output
375
                "tip:s"             => \@opt_tip,           # Force tip version(s)
437
                'tip:s'             => \@opt_tip,           # Force tip version(s)
376
                "log!"              => \$opt_log,
438
                'log!'              => \$opt_log,
377
                "delete!"           => \$opt_delete,
439
                'delete!'           => \$opt_delete,
378
                "postimage!"        => \$opt_postimage,
440
                'postimage!'        => \$opt_postimage,
379
                'workdir:s'         => \$opt_workDir,
441
                'workdir:s'         => \$opt_workDir,
380
                'relabel!'          => \$opt_relabel,
442
                'relabel!'          => \$opt_relabel,
381
                'svn!'              => \$opt_useSvn,
443
                'svn!'              => \$opt_useSvn,
382
                'testRmDatabase'    => \$opt_testRmDatabase,
444
                'testRmDatabase'    => \$opt_testRmDatabase,
383
                'fromSvn!'          => \$opt_extractFromSvn,
445
                'fromSvn!'          => \$opt_extractFromSvn,
384
                'resume'            => \$opt_resume,
446
                'resume'            => \$opt_resume,
-
 
447
                'mergePackages:s'   => \$opt_mergePackages,
-
 
448
                'subdir:s'          => \$opt_repoSubdir,    # Subdir within repo
-
 
449
                
385
                'svn!'          => \$opt_useSvn,
450
                'svn!'          => \$opt_useSvn,
386
                'testRmDatabase'    => \$opt_testRmDatabase,
451
                'testRmDatabase'    => \$opt_testRmDatabase,
-
 
452
                'fromSvn!'          => \$opt_extractFromSvn,
387
                );
453
                );
388
 
454
 
389
#
455
#
390
#   Process help and manual options
456
#   Process help and manual options
391
#
457
#
Line 423... Line 489...
423
#   Init the pruning mode
489
#   Init the pruning mode
424
#
490
#
425
setPruneMode( $opt_pruneModeString || 'ripple');
491
setPruneMode( $opt_pruneModeString || 'ripple');
426
 
492
 
427
#
493
#
-
 
494
#   Detect Merge Package Request
-
 
495
#   These use pre-configured bits
-
 
496
#
-
 
497
if ( $opt_mergePackages )
-
 
498
{
-
 
499
    if ( $opt_mergePackages eq 'LinuxDrivers' )
-
 
500
    {
-
 
501
        $opt_name = $opt_mergePackages;
-
 
502
        @ARGV = qw (linux_drivers_eb5600
-
 
503
                    linux_drivers_viper
-
 
504
                    linux_drivers_cobra
-
 
505
                    linux_drivers_etx86
-
 
506
                    linux_drivers_tp5600);
-
 
507
#                    linux_drivers_bcp4600
-
 
508
                    
-
 
509
 
-
 
510
    } elsif ( $opt_mergePackages eq 'flashCopier' ) {
-
 
511
        $opt_name = $opt_mergePackages;
-
 
512
        @ARGV = qw (
-
 
513
                flash_copier_eb5600
-
 
514
                flash_copier_pcp5700
-
 
515
                flash_copier_tp5600
-
 
516
                );
-
 
517
 
-
 
518
    } elsif ( $opt_mergePackages eq 'u-boot' ) {
-
 
519
        $opt_name = $opt_mergePackages;
-
 
520
        @ARGV = qw (
-
 
521
                u-boot
-
 
522
                u-boot-hk
-
 
523
                );
-
 
524
 
-
 
525
    } elsif ( $opt_mergePackages eq 'dams_gen1' ) {
-
 
526
        $opt_name = $opt_mergePackages;
-
 
527
        @ARGV = qw (
-
 
528
                    dams_eb5600
-
 
529
                    dams_pcp5700
-
 
530
                    dams_tp5600
-
 
531
                );
-
 
532
 
-
 
533
    } elsif ( $opt_mergePackages eq 'linux_day0fs_gen1' ) {
-
 
534
        $opt_name = $opt_mergePackages;
-
 
535
        @ARGV = qw (
-
 
536
                    linux_day0fs_eb5600
-
 
537
                    linux_day0fs_tp5600
-
 
538
                    linux_day0fs_etx86
-
 
539
                );
-
 
540
 
-
 
541
    } elsif ( $opt_mergePackages eq 'linux_kernel_gen1' ) {
-
 
542
        $opt_name = $opt_mergePackages;
-
 
543
        @ARGV = qw (
-
 
544
                    linux_kernel_etx86
-
 
545
                    linux_kernel_tp5600
-
 
546
                    linux_kernel_eb5600
-
 
547
                    linux_kernel_bcp4600
-
 
548
                );
-
 
549
 
-
 
550
    } else
-
 
551
    {
-
 
552
        Error ("Unknown Merge Package Name: $opt_mergePackages");
-
 
553
    }
-
 
554
}
428
#   Get data for all packages
555
#   Get data for all packages
429
#
556
#
430
foreach my $packageName ( @ARGV )
557
foreach my $packageName ( @ARGV )
431
{
558
{
432
    next unless ( $packageName );
559
    next unless ( $packageName );
Line 492... Line 619...
492
 
619
 
493
if ( $opt_flat )
620
if ( $opt_flat )
494
{
621
{
495
#    @flatOrder = sort {$versions{$a}{version} cmp $versions{$b}{version}} keys(%versions);
622
#    @flatOrder = sort {$versions{$a}{version} cmp $versions{$b}{version}} keys(%versions);
496
#    @flatOrder = sort {$versions{$a}{created} cmp $versions{$b}{created}} keys(%versions);
623
#    @flatOrder = sort {$versions{$a}{created} cmp $versions{$b}{created}} keys(%versions);
-
 
624
 
-
 
625
    if ( $flatMode == 1 ) {
-
 
626
        Message ("Flat import. Sorted by TimeStamp");
-
 
627
        @flatOrder = sort {$versions{$a}{TimeStamp} cmp $versions{$b}{TimeStamp}} keys(%versions);
-
 
628
    } elsif ( $flatMode == 2 ) {
-
 
629
        Message ("Flat import. Sorted by Version");
-
 
630
 
-
 
631
        # Only iff all the bits are numeric
-
 
632
        sub sortCotsVersion
-
 
633
        {
-
 
634
            my @va = split '\.', $versions{$a}{vname};
-
 
635
            my @vb = split '\.', $versions{$b}{vname};
-
 
636
 
-
 
637
            my $rv = scalar @va <=> scalar @vb;
-
 
638
            return $rv if ( $rv );
-
 
639
 
-
 
640
            foreach my $ii ( 0 .. scalar @va )
-
 
641
            {
-
 
642
                $va[$ii] = '' unless ( defined $va[$ii] );
-
 
643
                $vb[$ii] = '' unless ( defined $vb[$ii] );
-
 
644
                if ( ($va[$ii] =~ m~^\d+$~) && ($va[$ii] =~ m~^\d+$~)  )
-
 
645
                {
-
 
646
                    $rv = $va[$ii] <=> $vb[$ii];
-
 
647
                }
-
 
648
                else
-
 
649
                {
-
 
650
                    $rv = $va[$ii] cmp $vb[$ii];
-
 
651
                }
-
 
652
                return $rv if ( $rv );
-
 
653
            }
-
 
654
            return $rv;
-
 
655
        }
-
 
656
 
-
 
657
        @flatOrder = sort sortCotsVersion keys(%versions);
-
 
658
#        @flatOrder = sort {$versions{$a}{vname} cmp $versions{$b}{vname}} keys(%versions);
-
 
659
    } else {
497
    @flatOrder = sort {$a <=> $b} keys(%versions);
660
        @flatOrder = sort {$a <=> $b} keys(%versions);
-
 
661
    }
498
    my $tip = $flatOrder[-1];
662
    my $tip = $flatOrder[-1];
499
    $versions{$tip}{Tip} = 1 if $tip;
663
    $versions{$tip}{Tip} = 1 if $tip;
500
}
664
}
501
 
665
 
502
#
666
#
Line 555... Line 719...
555
    #   Going to do serious work
719
    #   Going to do serious work
556
    #   Need to ensure we have more arguments
720
    #   Need to ensure we have more arguments
557
    #
721
    #
558
    if ( $opt_protected )
722
    if ( $opt_protected )
559
    {
723
    {
560
        Warning("Protected Package not transferred: $packageNames[0] - $opt_protected",
724
        Warning("Protected Package not transferred: $packageNames - $opt_protected",
561
                "See cc2svn_protected.txt for details");
725
                "See cc2svn_protected.txt for details");
562
        exit 0;
726
        exit 0;
563
    }
727
    }
564
 
728
 
565
    if ( $noTransfer )
729
    if ( $noTransfer )
566
    {
730
    {
567
        Warning("Protected Package not transferred: $packageNames[0]",
731
        Warning("Protected Package not transferred: $packageNames",
568
                "Configured within this program");
732
                "Configured within this program");
569
        exit 0;
733
        exit 0;
570
    }
734
    }
571
 
735
 
572
    #
736
    #
Line 722... Line 886...
722
        $opt_flat = 1;
886
        $opt_flat = 1;
723
        setPruneMode('none') unless (defined $opt_pruneModeString);
887
        setPruneMode('none') unless (defined $opt_pruneModeString);
724
    }
888
    }
725
 
889
 
726
 
890
 
727
    if ( $packageNames[0] =~ m'^br_applet_' )
891
    if ( $packageNames =~ m'^br_applet_' )
728
    {
892
    {
729
      $opt_flat = 1 unless defined $opt_flat;
893
      $opt_flat = 1 unless defined $opt_flat;
730
    }
894
    }
731
 
895
 
732
    if ( exists $specialPackages{$packageNames[0]} )
896
    if ( exists $specialPackages{$packageNames} )
733
    {
897
    {
734
        my $data = ',' . $specialPackages{$packageNames[0]} . ',';
898
        my $data = ',' . $specialPackages{$packageNames} . ',';
735
 
899
 
736
        if ( index( $data, ',all' ) >= 0) {
900
        if ( index( $data, ',all' ) >= 0) {
737
            setPruneMode('none') unless (defined $opt_pruneModeString);
901
            setPruneMode('none') unless (defined $opt_pruneModeString);
738
        }
902
        }
739
        
903
        
740
        if ( index( $data, 'protected,' ) >= 0) {
904
        if ( index( $data, ',protected,' ) >= 0) {
741
            $noTransfer = 1;
905
            $noTransfer = 1;
742
        }
906
        }
743
 
907
 
744
        if ( index( $data, 'flat,' ) >= 0) {
908
        if ( index( $data, ',flat,' ) >= 0) {
745
            $opt_flat = 1;
909
            $opt_flat = 1;
746
        }
910
        }
747
 
911
 
-
 
912
        if ( index( $data, ',flatTime,' ) >= 0) {
-
 
913
            Message ("Flatten import tree. Sort by Time");
-
 
914
            $opt_flat = 1;
-
 
915
            $flatMode = 1;          # By Time
-
 
916
            $opt_processRipples = 0;
-
 
917
        }
-
 
918
 
-
 
919
        if ( index( $data, ',flatVersion,' ) >= 0) {
-
 
920
            Message ("Flatten import tree. Sort by Version");
-
 
921
            $opt_flat = 1;
-
 
922
            $flatMode = 2;          # By Version
-
 
923
            $opt_processRipples = 0;
-
 
924
        }
-
 
925
 
-
 
926
        if ( index( $data, ',processRipples,' ) >= 0) {
-
 
927
            $opt_processRipples = 1;
-
 
928
        }
-
 
929
 
748
        if ( index( $data, 'SetProjectBase,' ) >= 0) {
930
        if ( index( $data, ',SetProjectBase,' ) >= 0) {
749
            $opt_preserveProjectBase = 1;
931
            $opt_preserveProjectBase = 1;
750
            $opt_ignoreProjectBaseErrors = 1;
932
            $opt_ignoreProjectBaseErrors = 1;
751
            Message ("Preserving ProjectBase");
933
            Message ("Preserving ProjectBase");
752
        }
934
        }
753
 
935
 
754
        if ( index( $data, 'AllowMultiPath,' ) >= 0) {
936
        if ( index( $data, ',AllowMultiPath,' ) >= 0) {
755
            $opt_AllowMuliplePaths = 1;
937
            $opt_AllowMuliplePaths = 1;
756
            Message ("Allowing Multiple Paths");
938
            Message ("Allowing Multiple Paths");
757
        }
939
        }
758
 
940
 
-
 
941
        if ( index( $data, ',PatchIsaRipple,' ) >= 0) {
-
 
942
            $opt_PatchIsaRipple = 1;
-
 
943
            Message ("Treating Patch as a ripple");
-
 
944
        }
-
 
945
        
759
        if ( $data =~ m~,ForceProjectBase=(.*?),~ ) {
946
        if ( $data =~ m~,ForceProjectBase=(.*?),~ ) {
760
            $opt_forceProjectBase = $1;
947
            $opt_forceProjectBase = $1;
761
            $opt_AllowMuliplePaths = 1;
948
            $opt_AllowMuliplePaths = 1;
762
            Message ("Force Project Base: $opt_forceProjectBase");
949
            Message ("Force Project Base: $opt_forceProjectBase");
763
        }
950
        }
764
 
951
 
765
        if ( $data =~ m~,LimitProjectBase=(.*),~ ) {
952
        if ( $data =~ m~,LimitProjectBase=(.*?),~ ) {
766
            $opt_AllowMuliplePaths = 1;
953
            $opt_AllowMuliplePaths = 1;
767
            @opt_limitProjectBase = split(':', $1);
954
            @opt_limitProjectBase = split(':', $1);
768
            Message ("Limit Project Base: @opt_limitProjectBase");
955
            Message ("Limit Project Base: @opt_limitProjectBase");
769
        }
956
        }
770
        
-
 
771
 
957
 
-
 
958
        if ( $data =~ m~,mergePaths=(.*?),~ ) {
-
 
959
            @opt_mergePaths = split(':', $1);
-
 
960
            Message ("Merge Paths: @opt_mergePaths");
-
 
961
        }
-
 
962
 
-
 
963
        if ( $data =~ m~,DeleteFiles=(.*?),~ ) {
-
 
964
            @opt_deleteFiles = split(':', $1);
-
 
965
            Message ("Delete Files: @opt_deleteFiles");
-
 
966
        }
-
 
967
        
772
        if ( index( $data, 'IgnoreProjectBase,' ) >= 0) {
968
        if ( index( $data, ',IgnoreProjectBase,' ) >= 0) {
773
            $opt_ignoreProjectBaseErrors = 1;
969
            $opt_ignoreProjectBaseErrors = 1;
774
            Message ("Ignore ProjectBase Errors");
970
            Message ("Ignore ProjectBase Errors");
775
        }
971
        }
776
 
972
 
777
        if ( index( $data, 'IgnoreMakeProject,' ) >= 0) {
973
        if ( index( $data, ',IgnoreMakeProject,' ) >= 0) {
778
            $opt_ignoreMakeProjectErrors = 1;
974
            $opt_ignoreMakeProjectErrors = 1;
779
            Message ("Ignore MakeProject Usage");
975
            Message ("Ignore MakeProject Usage");
780
        }
976
        }
781
 
977
 
782
        if ( index( $data, 'IgnoreBadPath,' ) >= 0) {
978
        if ( index( $data, ',IgnoreBadPath,' ) >= 0) {
783
            $opt_ignoreBadPaths = 1;
979
            $opt_ignoreBadPaths = 1;
784
            Message ("Ignore Bad Paths in makefile Usage");
980
            Message ("Ignore Bad Paths in makefile Usage");
785
        }
981
        }
786
        
982
        
787
        if ( index( $data, 'utf8,' ) >= 0) {
983
        if ( index( $data, ',utf8,' ) >= 0) {
788
            $mustConvertFileNames = 1;
984
            $mustConvertFileNames = 1;
789
            Message ("Convert filenames to UTF8");
985
            Message ("Convert filenames to UTF8");
790
        }
986
        }
791
    }
987
    }
792
 
988
 
Line 1592... Line 1788...
1592
    {
1788
    {
1593
        my $ep = $versions{$entry};
1789
        my $ep = $versions{$entry};
1594
        if ( defined $ep->{buildVersion} )
1790
        if ( defined $ep->{buildVersion} )
1595
        {
1791
        {
1596
            my $suffix = $ep->{suffix};
1792
            my $suffix = $ep->{suffix};
-
 
1793
            my $pname = $ep->{name};
-
 
1794
            $suffix = $pname . $suffix;
-
 
1795
 
1597
            my ($major, $minor, $patch, $build) = @{$ep->{buildVersion}};
1796
            my ($major, $minor, $patch, $build) = @{$ep->{buildVersion}};
1598
#print "--- $major, $minor, $patch, $build, $suffix\n";
1797
#print "--- $major, $minor, $patch, $build, $suffix\n";
-
 
1798
 
-
 
1799
            my $key;
-
 
1800
            my $type = 'patch';
-
 
1801
            $type = $packageRippleControl{$pname} if ( exists  $packageRippleControl{$pname});
-
 
1802
            if ( $type eq 'patch' ) {
-
 
1803
                $key = "$major.$minor.$patch";
-
 
1804
#                $build = $build;
-
 
1805
 
-
 
1806
            } elsif ( $type eq 'minor' ) {
-
 
1807
                $key = "$major.$minor";
-
 
1808
#                $build = ($patch * 1000) + $build;
-
 
1809
 
-
 
1810
            } elsif ( $type eq 'major' ) {
-
 
1811
                $key = "$major";
-
 
1812
#                $build = ($minor * 1000000) + ($patch * 1000) + $build;
-
 
1813
            } else {
-
 
1814
                Error ("Invalid type in packageRippleControl for package $pname: $type");
-
 
1815
            }
-
 
1816
 
1599
            $rippleVersions{$suffix}{"$major.$minor.$patch"}{count}++;
1817
            $rippleVersions{$suffix}{$key}{count}++;
1600
            my $rp = $rippleVersions{$suffix}{"$major.$minor.$patch"};
1818
            my $rp = $rippleVersions{$suffix}{$key};
1601
            $rp->{list}{$entry} = 1;
1819
            $rp->{list}{$entry} = $versions{$entry}{version};
1602
 
1820
 
1603
            next if ( $ep->{badVcsTag} );
1821
#            next if ( $ep->{badVcsTag} );
1604
            next if ( $ep->{locked} eq 'N');
1822
#            next if ( $ep->{locked} eq 'N');
-
 
1823
 
1605
            if (!defined ($rp->{min}) || $rp->{min} > $build )
1824
#            if (!defined ($rp->{min}) || $rp->{min} > $build )
1606
            {
1825
#            {
1607
                $rp->{pvid} = $entry;
1826
#                $rp->{pvid} = $entry;
1608
                $rp->{min} = $build;
1827
#                $rp->{min} = $build;
1609
            }
1828
#            }
1610
        }
1829
        }
1611
    }
1830
    }
1612
#            DebugDumpData("rippleVersions", \%rippleVersions );
1831
#            DebugDumpData("rippleVersions", \%rippleVersions );
1613
 
1832
 
1614
    while ( my($suffix, $e1) = each %rippleVersions )
1833
    while ( my($suffix, $e1) = each %rippleVersions )
1615
    {
1834
    {
-
 
1835
#DebugDumpData("rippleVersions. Suffix , e1", $suffix, $e1 );
-
 
1836
        
1616
        while ( my( $mmp, $e2) = each %{$e1} )
1837
        while ( my( $mmp, $e2) = each %{$e1} )
1617
        {
1838
        {
1618
            next unless ( exists  $e2->{pvid} );
1839
#            next unless ( exists  $e2->{pvid} );
1619
            my $entry = $e2->{pvid};
1840
#            my $entry = $e2->{pvid};
1620
            if ( !exists $versions{$entry} )
1841
#            if ( !exists $versions{$entry} )
1621
            {
1842
#            {
1622
                Error ("Internal: Expected entry not found: $entry, $mmp");
1843
#                Error ("Internal: Expected entry not found: $entry, $mmp");
1623
            }
1844
#            }
1624
 
1845
#
1625
            $versions{$entry}{keepLowestRipple} = 1;
1846
#            $versions{$entry}{keepLowestRipple} = 1;
1626
#print "--- Keep Riple $versions{$entry}{vname}\n";
1847
#print "--- Keep Ripple: $versions{$entry}{name} $versions{$entry}{vname}\n";
1627
 
1848
 
1628
            #
1849
            #
1629
            #   Update entry with list of associated ripples, removing lowest
1850
            #   Update entry with list of associated ripples, removing lowest
1630
            #
1851
            #
-
 
1852
            my @rippleList = sort {$e2->{list}{$a} cmp $e2->{list}{$b}} keys %{$e2->{list}};
1631
            delete $e2->{list}{$entry};
1853
            my $firstEntry = shift @rippleList;
1632
            my @rippleList = sort keys %{$e2->{list}};
1854
            $versions{$firstEntry}{keepLowestRipple} = 1;
-
 
1855
#print "--- Keep Lowest: $versions{$firstEntry}{name} $versions{$firstEntry}{vname}\n";
-
 
1856
 
1633
            if ( @rippleList)
1857
            if ( @rippleList)
1634
            {
1858
            {
1635
#DebugDumpData("LIST: $entry", $e2->{list}, \@rippleList  );
1859
#DebugDumpData("LIST: $entry", $e2->{list}, \@rippleList  );
1636
                @{$versions{$entry}{rippleList}} = @rippleList;
1860
                @{$versions{$firstEntry}{rippleList}} = @rippleList;
-
 
1861
 
-
 
1862
#                foreach my $pvid ( @rippleList )
-
 
1863
#                {
-
 
1864
#                    print "----- $versions{$pvid}{name} $versions{$pvid}{vname}\n";
-
 
1865
#                }
1637
            }
1866
            }
1638
        }
1867
        }
1639
    }
1868
    }
-
 
1869
#    Error ("Just Testing");
1640
}
1870
}
1641
 
1871
 
1642
#-------------------------------------------------------------------------------
1872
#-------------------------------------------------------------------------------
1643
# Function        : processBranch
1873
# Function        : processBranch
1644
#
1874
#
Line 1661... Line 1891...
1661
        {
1891
        {
1662
            newProject();
1892
            newProject();
1663
            $createBranch = 1;
1893
            $createBranch = 1;
1664
            $createSuffix = 1 if $versions{$entry}{newSuffix};
1894
            $createSuffix = 1 if $versions{$entry}{newSuffix};
1665
        }
1895
        }
1666
 
-
 
1667
        newPackageVersion( $entry );
1896
        newPackageVersion( $entry );
-
 
1897
 
1668
no warnings "recursion";
1898
no warnings "recursion";
1669
        processBranch (@{$versions{$entry}{next}});
1899
        processBranch (@{$versions{$entry}{next}});
1670
    }
1900
    }
1671
}
1901
}
1672
 
1902
 
Line 1700... Line 1930...
1700
    Message ("------------------------------------------------------------------" );
1930
    Message ("------------------------------------------------------------------" );
1701
    Message ("Package $processCount of $processTotal");
1931
    Message ("Package $processCount of $processTotal");
1702
 
1932
 
1703
    Message ("New package-version: " . GetVname($entry) . " Tag: " . $versions{$entry}{vcsTag} );
1933
    Message ("New package-version: " . GetVname($entry) . " Tag: " . $versions{$entry}{vcsTag} );
1704
 
1934
 
-
 
1935
#    if ( $versions{$entry}{rippleList} )
-
 
1936
#    {
-
 
1937
#        Message ("Version has ripples");
-
 
1938
#        foreach my $rentry ( @{$versions{$entry}{rippleList}} )
-
 
1939
#        {
-
 
1940
#            Message ("  -- ". GetVname($rentry));
-
 
1941
#        }
-
 
1942
#    }
-
 
1943
    
-
 
1944
 
1705
    #
1945
    #
1706
    #   Detect user abort
1946
    #   Detect user abort
1707
    #
1947
    #
1708
    if ( -f $cwd . '/stopfile' )
1948
    if ( -f $cwd . '/stopfile' )
1709
    {
1949
    {
Line 1782... Line 2022...
1782
    #   Delete the created view
2022
    #   Delete the created view
1783
    #   Its just a directory, so delete it
2023
    #   Its just a directory, so delete it
1784
    #
2024
    #
1785
    if ( $data{ViewRoot} && -d $data{ViewRoot})
2025
    if ( $data{ViewRoot} && -d $data{ViewRoot})
1786
    {
2026
    {
1787
        if ( !$opt_reuse || ($rv && ($rv != 4 && $rv != 12 && $rv != 5 )) )
2027
        if ( $opt_reuse == 0 || $opt_reuse == 2 || ($rv && ($rv != 4 && $rv != 12 && $rv != 5 )) )
1788
        {
2028
        {
1789
            Message ("Delete View: $data{ViewRoot}");
2029
            Message ("Delete View: $data{ViewRoot}");
1790
            RmDirTree ($data{ViewRoot} );
2030
            RmDirTree ($data{ViewRoot} );
1791
        }
2031
        }
1792
        else
2032
        else
Line 1798... Line 2038...
1798
    else
2038
    else
1799
    {
2039
    {
1800
        Message ("No view to delete");
2040
        Message ("No view to delete");
1801
    }
2041
    }
1802
 
2042
 
1803
 
-
 
1804
    #
2043
    #
1805
    #   If this version has any 'ripples' then process them while we have the
-
 
1806
    #   main view. Note the ripple list may contain entries that do not
-
 
1807
    #   exist - they will have been pruned.
2044
    #   Create pretty pictures
1808
    #
2045
    #
1809
if(1) {
2046
    unless ( $rv )
1810
    foreach my $rentry ( @{$versions{$entry}{rippleList}} )
-
 
1811
    {
2047
    {
1812
        next unless( exists $versions{$rentry} );
2048
        getSvnData();
-
 
2049
        createImages();
-
 
2050
    }
1813
 
2051
 
-
 
2052
 
-
 
2053
    if($opt_processRipples)
-
 
2054
    {
-
 
2055
        #
-
 
2056
        #   If this version has any 'ripples' then process them while we have the
-
 
2057
        #   main view. Note the ripple list may contain entries that do not
-
 
2058
        #   exist - they will have been pruned.
-
 
2059
        #
1814
        if ($versions{$rentry}{Processed})
2060
        foreach my $rentry ( @{$versions{$entry}{rippleList}} )
1815
        {
2061
        {
-
 
2062
            next unless( exists $versions{$rentry} );
-
 
2063
 
-
 
2064
            if ($versions{$rentry}{Processed})
-
 
2065
            {
1816
            Warning ("Ripple Processed before main entry");
2066
                Warning ("Ripple Processed before main entry");
1817
            $versions{$rentry}{rippleProcessed} = 1;
2067
                $versions{$rentry}{rippleProcessed} = 1;
1818
        }
2068
            }
1819
 
2069
 
1820
        Message ("Proccessing associated Ripple: " . GetVname($rentry));
2070
            Message ("Proccessing associated Ripple: " . GetVname($rentry));
1821
        newPackageVersion($rentry);
2071
            newPackageVersion($rentry);
-
 
2072
        }
1822
    }
2073
    }
1823
}
2074
 
1824
}
2075
}
1825
 
2076
 
1826
#-------------------------------------------------------------------------------
2077
#-------------------------------------------------------------------------------
1827
# Function        : newPackageVersionBody
2078
# Function        : newPackageVersionBody
1828
#
2079
#
Line 2054... Line 2305...
2054
        $rv = extractFilesFromClearCase( $data, $cc_path, $cc_label );
2305
        $rv = extractFilesFromClearCase( $data, $cc_path, $cc_label );
2055
        return $rv if ( $rv );
2306
        return $rv if ( $rv );
2056
    }
2307
    }
2057
 
2308
 
2058
    #
2309
    #
-
 
2310
    #   Delete specified files from the source tree
-
 
2311
    #
-
 
2312
    if ( @opt_deleteFiles )
-
 
2313
    {
-
 
2314
        my @args;
-
 
2315
        foreach my $delFileSpec ( @opt_deleteFiles )
-
 
2316
        {
-
 
2317
            Message ("Deleting files that match: $delFileSpec");
-
 
2318
            push @args, "--FilterIn=$delFileSpec";
-
 
2319
        }
-
 
2320
        my $search = JatsLocateFiles->new("--Recurse=1", @args );
-
 
2321
        my @rmFiles = $search->search($data->{ViewRoot});
-
 
2322
        foreach my $rmFile ( @rmFiles )
-
 
2323
        {
-
 
2324
            Information("Deleting: $rmFile");
-
 
2325
            unlink ( join ('/', $data->{ViewRoot}, $rmFile) )|| Warning "Cannot delete: $rmFile";
-
 
2326
        }
-
 
2327
    }
-
 
2328
 
-
 
2329
    #
2059
    #   Developers have been slack
2330
    #   Developers have been slack
2060
    #       Sometime the mark the source path as 'GMTPE2005'
2331
    #       Sometime the mark the source path as 'GMTPE2005'
2061
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
2332
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
2062
    #
2333
    #
2063
    #   Attempt to suck up empty directories below the specified
2334
    #   Attempt to suck up empty directories below the specified
Line 2238... Line 2509...
2238
    }
2509
    }
2239
 
2510
 
2240
    push @args, "-branch=$currentBranchName" if ( defined $currentBranchName );
2511
    push @args, "-branch=$currentBranchName" if ( defined $currentBranchName );
2241
    my $datafile = "importdata.$import_label.properties";
2512
    my $datafile = "importdata.$import_label.properties";
2242
 
2513
 
-
 
2514
    my @mergeArg;
-
 
2515
    push (@mergeArg, "-mergePaths", join(',', @opt_mergePaths) ) if ( @opt_mergePaths );
-
 
2516
 
-
 
2517
    if ( exists $mergePathExtended{$packageNames}  )
-
 
2518
    {
-
 
2519
        my $eentry = $mergePathExtended{$packageNames};
-
 
2520
        if ( exists $eentry->{$import_label} )
-
 
2521
        {
-
 
2522
            @opt_mergePaths = split(':', $eentry->{$import_label});
-
 
2523
            Message("New MergePath Info: @opt_mergePaths");
-
 
2524
 
-
 
2525
            #
-
 
2526
            #   Args take effect next version
-
 
2527
            #   In this version have no merging - reset the image
-
 
2528
            #
-
 
2529
            @mergeArg = ();
-
 
2530
        }
-
 
2531
    }
-
 
2532
 
2243
    $rv = JatsToolPrint ( 'jats_svn', 'import', '-reuse' ,
2533
    $rv = JatsToolPrint ( 'jats_svn', 'import', '-reuse' ,
2244
                    "-package=$svnRepo/$packageNames",
2534
                    "-package=$svnRepo/$packageNames",
2245
                    "-dir=$data->{ViewPath}",
2535
                    "-dir=$data->{ViewPath}",
2246
                    "-label=$import_label",
2536
                    "-label=$import_label",
2247
                    "-datafile=$datafile",
2537
                    "-datafile=$datafile",
2248
                    @args,
2538
                    @args,
-
 
2539
                    @mergeArg,
2249
                     );
2540
                     );
2250
 
2541
 
2251
    if ( $rv )
2542
    if ( $rv )
2252
    {
2543
    {
2253
        $data->{errStr} = 'Failed to import to SVN';
2544
        $data->{errStr} = 'Failed to import to SVN';
Line 2718... Line 3009...
2718
{
3009
{
2719
    my ($data, $cc_path, $cc_label) = @_;
3010
    my ($data, $cc_path, $cc_label) = @_;
2720
    my $tryCount = 0;
3011
    my $tryCount = 0;
2721
    my $rv = 99;
3012
    my $rv = 99;
2722
 
3013
 
2723
    $data->{ViewRoot} = $opt_name ? $opt_name : "$cc_label";
3014
    $data->{ViewRoot} = ( defined $opt_name && ! defined $opt_mergePackages )? $opt_name : "$cc_label";
2724
    $data->{ViewPath} =  $data->{ViewRoot} . $cc_path;
3015
    $data->{ViewPath} =  $data->{ViewRoot} . $cc_path;
2725
    
3016
    
2726
    if ( $opt_preserveProjectBase && !$opt_forceProjectBase )
3017
    if ( $opt_preserveProjectBase && !$opt_forceProjectBase )
2727
    {
3018
    {
2728
        my $cc_vob = $cc_path;
3019
        my $cc_vob = $cc_path;
Line 2739... Line 3030...
2739
        return 0;
3030
        return 0;
2740
    }
3031
    }
2741
 
3032
 
2742
    while ( $rv == 99 ) {
3033
    while ( $rv == 99 ) {
2743
        my @args;
3034
        my @args;
2744
        push (@args, '-view', $opt_name ) if ( defined $opt_name );
3035
        push (@args, '-view', $opt_name ) if ( defined $opt_name && ! defined $opt_mergePackages );
2745
        $rv = JatsToolPrint ( 'jats_ccrelease', '-extractfiles', '-root=.' , '-noprefix',
3036
        $rv = JatsToolPrint ( 'jats_ccrelease', '-extractfiles', '-root=.' , '-noprefix',
2746
                    "-label=$cc_label" ,
3037
                    "-label=$cc_label" ,
2747
                    "-path=$cc_path",
3038
                    "-path=$cc_path",
2748
                    @args
3039
                    @args
2749
                    );
3040
                    );
Line 3673... Line 3964...
3673
                    #
3964
                    #
3674
                    #   Some developers have a 'special' package version
3965
                    #   Some developers have a 'special' package version
3675
                    #   We really need to ignore them
3966
                    #   We really need to ignore them
3676
                    #
3967
                    #
3677
                    next if ( $pkg_ver eq '23.23.23.ssw' );
3968
                    next if ( $pkg_ver eq '23.23.23.ssw' );
3678
                    
-
 
-
 
3969
 
3679
                    #
3970
                    #
3680
                    #   Add data to the hash
3971
                    #   Add data to the hash
3681
                    #       Remove entries that address themselves
3972
                    #       Remove entries that address themselves
3682
                    #
3973
                    #
3683
                    push (@{$versions{$last_pv_id}{next}}, $pv_id) unless ($pv_id == $last_pv_id || $last_pv_id == 0) ;
3974
                    push (@{$versions{$last_pv_id}{next}}, $pv_id) unless ($pv_id == $last_pv_id || $last_pv_id == 0) ;
Line 3703... Line 3994...
3703
                    $versions{$pv_id}{version} = $version;
3994
                    $versions{$pv_id}{version} = $version;
3704
                    $versions{$pv_id}{buildVersion} = $buildVersion;
3995
                    $versions{$pv_id}{buildVersion} = $buildVersion;
3705
                    $versions{$pv_id}{isaWip} = 1 if ( $isaWip );
3996
                    $versions{$pv_id}{isaWip} = 1 if ( $isaWip );
3706
 
3997
 
3707
                    #
3998
                    #
3708
                    #   New methof for detecting a ripple
3999
                    #   New method for detecting a ripple
3709
                    #       Don't look at the version number
4000
                    #       Don't look at the version number
3710
                    #       Use RM data
4001
                    #       Use RM data
3711
                    #       Inlude the comment - there are some cases where the comment
4002
                    #       Inlude the comment - there are some cases where the comment
3712
                    #       appears to have been user modified.
4003
                    #       appears to have been user modified.
3713
                    #
4004
                    #
Line 4084... Line 4375...
4084
#
4375
#
4085
sub createImages
4376
sub createImages
4086
{
4377
{
4087
 
4378
 
4088
    my $filebase = "${packageNames}";
4379
    my $filebase = "${packageNames}";
-
 
4380
    my $openOk;
-
 
4381
    foreach my $ii ( 0 .. 5 )
-
 
4382
    {
4089
    open (FH, '>', $cwd . "/$filebase.dot" ) or die "Cannot open output";
4383
        if (open (FH, '>', $cwd . "/$filebase.dot" ))
-
 
4384
        {
-
 
4385
            $openOk = 1;
-
 
4386
            last;
-
 
4387
        }
-
 
4388
        sleep (2);
-
 
4389
    }
-
 
4390
    unless ( $openOk )
-
 
4391
    {
-
 
4392
        Warning ("Cannot open image output: $filebase.dot");
-
 
4393
        return;
-
 
4394
    }
-
 
4395
 
-
 
4396
 
4090
    print FH "digraph \"${packageNames}\" {\n";
4397
    print FH "digraph \"${packageNames}\" {\n";
4091
    #print FH "rankdir=LR;\n";
4398
    #print FH "rankdir=LR;\n";
4092
    print FH "node[fontsize=16];\n";
4399
    print FH "node[fontsize=16];\n";
4093
    print FH "node[target=_graphviz];\n";
4400
    print FH "node[target=_graphviz];\n";
4094
#    print FH "subgraph cluster_A {\n";
4401
#    print FH "subgraph cluster_A {\n";
Line 4488... Line 4795...
4488
    $opt_vobMap = $ScmRepoMap{$packageNames}{repo}
4795
    $opt_vobMap = $ScmRepoMap{$packageNames}{repo}
4489
        if (exists $ScmRepoMap{$packageNames});
4796
        if (exists $ScmRepoMap{$packageNames});
4490
 
4797
 
4491
    $opt_protected = $ScmRepoMap{$packageNames}{protected}
4798
    $opt_protected = $ScmRepoMap{$packageNames}{protected}
4492
        if (exists $ScmRepoMap{$packageNames}{protected});
4799
        if (exists $ScmRepoMap{$packageNames}{protected});
4493
 
-
 
4494
    #
4800
    #
4495
    #   Free the memory
4801
    #   Free the memory
4496
    #
4802
    #
4497
    %ScmRepoMap = ();
4803
    %ScmRepoMap = ();
4498
 
4804
 
Line 4501... Line 4807...
4501
    #
4807
    #
4502
    Warning ("No VOB Mapping found")
4808
    Warning ("No VOB Mapping found")
4503
        unless ($opt_vobMap);
4809
        unless ($opt_vobMap);
4504
    Error("No repository specified. ie -repo=DevTools or -repo=COTS")
4810
    Error("No repository specified. ie -repo=DevTools or -repo=COTS")
4505
        unless ( $opt_repo || $opt_vobMap );
4811
        unless ( $opt_repo || $opt_vobMap );
4506
 
-
 
4507
    my $r1 = ($opt_repo || '') . '/' . ($opt_vobMap || '');
4812
    my $r1 = ($opt_repo || '') . '/' . ($opt_vobMap || '') . '/' . ($opt_repoSubdir || '') ;
-
 
4813
    $r1 =~ s~//~/~g;
4508
    $r1 =~ s~^/~~;
4814
    $r1 =~ s~^/~~;
4509
    $r1 =~ s~/$~~;
4815
    $r1 =~ s~/$~~;
4510
    $svnRepo = $opt_repo_base . $r1;
4816
    $svnRepo = $opt_repo_base . $r1;
4511
 
4817
 
4512
    Verbose( "Repo URL: $svnRepo");
4818
    Message( "Repo URL: $svnRepo");
4513
}
4819
}
4514
 
4820
 
4515
 
4821
 
4516
#-------------------------------------------------------------------------------
4822
#-------------------------------------------------------------------------------
4517
# Function        : getEssenialPackageVersions
4823
# Function        : getEssenialPackageVersions