Subversion Repositories DevTools

Rev

Rev 3893 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3893 Rev 3965
Line 92... Line 92...
92
my @opt_deleteFiles;
92
my @opt_deleteFiles;
93
my $opt_useTestRepo;
93
my $opt_useTestRepo;
94
my $opt_saveCompressed;
94
my $opt_saveCompressed;
95
my $opt_skipBuildNameCheck;
95
my $opt_skipBuildNameCheck;
96
my $opt_deleteLinks;
96
my $opt_deleteLinks;
-
 
97
my $count_BadPaths = 0;
-
 
98
my $opt_IgnoreBadSourcePath;
-
 
99
my $opt_forceSuck;
-
 
100
my $opt_noVCS;
97
 
101
 
98
################################################################################
102
################################################################################
99
#   List of Projects Suffixes and Branch Names to be used within SVN
103
#   List of Projects Suffixes and Branch Names to be used within SVN
100
#
104
#
101
#       Name        - Name of branch for the project
105
#       Name        - Name of branch for the project
Line 127... Line 131...
127
    '.pmb'      => { Name => 'Pietermaritzburg' },
131
    '.pmb'      => { Name => 'Pietermaritzburg' },
128
    '.vps'      => { Name => 'VixPayments' },
132
    '.vps'      => { Name => 'VixPayments' },
129
    '.ncc'      => { Name => 'NSWClubCard' },
133
    '.ncc'      => { Name => 'NSWClubCard' },
130
    '.rm'       => { Name => 'Rome' },
134
    '.rm'       => { Name => 'Rome' },
131
    '.vss'      => { Name => 'SmartSite' },
135
    '.vss'      => { Name => 'SmartSite' },
-
 
136
    '.ssts'     => { Name => 'SydneySchoolbus' },
132
    'unknown'   => { Name => 'UnknownProject' },
137
    'unknown'   => { Name => 'UnknownProject' },
133
 
138
 
134
    '.ebr'      => { Name => 'eBrio' , Trunk => 1 },
139
    '.ebr'      => { Name => 'eBrio' , Trunk => 1 },
135
    '.mas'      => { Name => 'Mass'  , Trunk => 1 },
140
    '.mas'      => { Name => 'Mass'  , Trunk => 1 },
136
    '.cr'       => { Name => 'Core'  , Trunk => 1 },
141
    '.cr'       => { Name => 'Core'  , Trunk => 1 },
Line 365... Line 370...
365
    'saftp'                 => 'IgnoreProjectBase,ForceProjectBase=/DPG_SWCode',
370
    'saftp'                 => 'IgnoreProjectBase,ForceProjectBase=/DPG_SWCode',
366
    'PFTPp'                 => 'IgnoreMakeProject,ForceProjectBase=/DPG_SWCode',        # Need to test
371
    'PFTPp'                 => 'IgnoreMakeProject,ForceProjectBase=/DPG_SWCode',        # Need to test
367
    'ocp5000'               => 'ForceProjectBase=/DPG_SWCode,RetainCompressed,IgnoreMakeProject', # Need to test
372
    'ocp5000'               => 'ForceProjectBase=/DPG_SWCode,RetainCompressed,IgnoreMakeProject', # Need to test
368
    'SPOS'                  => 'ForceProjectBase=/DPG_SWCode',
373
    'SPOS'                  => 'ForceProjectBase=/DPG_SWCode',
369
 
374
 
370
    'gak6000'               => 'ForceProjectBase=/DPG_SWCode',
375
    'gak6000'               => 'ForceProjectBase=/DPG_SWCode,IgnoreProjectBase',
371
    'gak5000'               => 'ForceProjectBase=/DPG_SWCode',
376
    'gak5000'               => 'ForceProjectBase=/DPG_SWCode,IgnoreProjectBase,IgnoreBadPath',
372
    'hcp6000'               => 'ForceProjectBase=/DPG_SWCode,RetainCompressed',
377
    'hcp5000'               => 'IgnoreMakeProject,ForceProjectBase=/DPG_SWCode,RetainCompressed,IgnoreBadSourcePath',
-
 
378
    'agents_unit'           => 'IgnoreProjectBase,ForceProjectBase=/DPG_SWCode',
-
 
379
 
373
    'tp6000'                => 'ForceProjectBase=/DPG_SWCode,RetainCompressed',
380
    'tp5000'                => 'noVCS,IgnoreProjectBase,ForceProjectBase=/DPG_SWCode',
374
    'vcp6000'               => 'ForceProjectBase=/DPG_SWCode,RetainCompressed',
381
    'vcp5000'               => 'IgnoreProjectBase,ForceProjectBase=/DPG_SWCode',
-
 
382
 
375
    'agents_unit'           => 'ForceProjectBase=/DPG_SWCode,RetainCompressed',
383
    'MetrixOra'             => 'Trunk=.sea,ForceSuck,ForceProjectBase=/MASS_Dev_Bus,IgnoreBadSourcePath,NoProcessRipples',
-
 
384
    'oracs'                 => 'ForceSuck,ForceProjectBase=/MASS_Dev_Bus,IgnoreBadSourcePath,NoProcessRipples,SelectProjectBase=MASS_Dev_Bus/web/patches/oracs:MASS_Dev_Bus/web/patches:MASS_Dev_Bus/web',
-
 
385
    'oradacw'               => 'ForceSuck,ForceProjectBase=/MASS_Dev_Bus,IgnoreBadSourcePath,NoProcessRipples,SelectProjectBase=MASS_Dev_Bus/web/patches/oradacw:MASS_Dev_Bus/web/patches:MASS_Dev_Bus/web',
-
 
386
    'orabocw'               => 'ForceSuck,ForceProjectBase=/MASS_Dev_Bus,IgnoreBadSourcePath,NoProcessRipples,SelectProjectBase=MASS_Dev_Bus/web/patches/orabocw:MASS_Dev_Bus/web/patches:MASS_Dev_Bus/web',
376
 
387
 
377
 
388
 
378
    'icl'                   => 'IgnoreProjectBase,',
389
    'icl'                   => 'IgnoreProjectBase,',
379
    'itso'                  => 'IgnoreProjectBase,',
390
    'itso'                  => 'IgnoreProjectBase,',
380
#    'daf_osa_mos'           => 'IgnoreProjectBase,',
391
#    'daf_osa_mos'           => 'IgnoreProjectBase,',
Line 536... Line 547...
536
                'resume'            => \$opt_resume,
547
                'resume'            => \$opt_resume,
537
                'mergePackages:s'   => \$opt_mergePackages,
548
                'mergePackages:s'   => \$opt_mergePackages,
538
                'subdir:s'          => \$opt_repoSubdir,    # Subdir within repo
549
                'subdir:s'          => \$opt_repoSubdir,    # Subdir within repo
539
                'fromSvn!'          => \$opt_extractFromSvn,
550
                'fromSvn!'          => \$opt_extractFromSvn,
540
                'testRepo!'         => \$opt_useTestRepo,
551
                'testRepo!'         => \$opt_useTestRepo,
-
 
552
                'novcs'             => \$opt_noVCS,
541
                );
553
                );
542
 
554
 
543
#
555
#
544
#   Process help and manual options
556
#   Process help and manual options
545
#
557
#
Line 1065... Line 1077...
1065
 
1077
 
1066
        if ( index( $data, ',processRipples,' ) >= 0) {
1078
        if ( index( $data, ',processRipples,' ) >= 0) {
1067
            $opt_processRipples = 1;
1079
            $opt_processRipples = 1;
1068
        }
1080
        }
1069
 
1081
 
-
 
1082
        if ( index( $data, ',NoProcessRipples,' ) >= 0) {
-
 
1083
            $opt_processRipples = 0;
-
 
1084
            Message ("Disable Processing of ripples");
-
 
1085
        }
-
 
1086
 
-
 
1087
        if ( index( $data, ',noVCS,' ) >= 0) {
-
 
1088
            $opt_noVCS = 1;
-
 
1089
            Message ("Use of ClearCase disabled.");
-
 
1090
        }
-
 
1091
 
1070
        if ( index( $data, ',SetProjectBase,' ) >= 0) {
1092
        if ( index( $data, ',SetProjectBase,' ) >= 0) {
1071
            $opt_preserveProjectBase = 1;
1093
            $opt_preserveProjectBase = 1;
1072
            $opt_ignoreProjectBaseErrors = 1;
1094
            $opt_ignoreProjectBaseErrors = 1;
1073
            Message ("Preserving ProjectBase");
1095
            Message ("Preserving ProjectBase");
1074
        }
1096
        }
Line 1076... Line 1098...
1076
        if ( index( $data, ',AllowMultiPath,' ) >= 0) {
1098
        if ( index( $data, ',AllowMultiPath,' ) >= 0) {
1077
            $opt_AllowMuliplePaths = 1;
1099
            $opt_AllowMuliplePaths = 1;
1078
            Message ("Allowing Multiple Paths");
1100
            Message ("Allowing Multiple Paths");
1079
        }
1101
        }
1080
 
1102
 
-
 
1103
        if ( index( $data, ',IgnoreBadSourcePath,' ) >= 0) {
-
 
1104
            $opt_IgnoreBadSourcePath = 1;
-
 
1105
            Message ("Ignore Source Paths tagged as Bad");
-
 
1106
        }
-
 
1107
        
1081
        if ( $data =~ m~,ForceProjectBase=(.*?),~ ) {
1108
        if ( $data =~ m~,ForceProjectBase=(.*?),~ ) {
1082
            $opt_forceProjectBase = $1;
1109
            $opt_forceProjectBase = $1;
1083
            $opt_AllowMuliplePaths = 1;
1110
            $opt_AllowMuliplePaths = 1;
1084
            Message ("Force Project Base: $opt_forceProjectBase");
1111
            Message ("Force Project Base: $opt_forceProjectBase");
1085
        }
1112
        }
Line 1109... Line 1136...
1109
 
1136
 
1110
        if ( $data =~ m~,DeleteLinks,~ ) {
1137
        if ( $data =~ m~,DeleteLinks,~ ) {
1111
            $opt_deleteLinks = 1;
1138
            $opt_deleteLinks = 1;
1112
            Message ("Delete soft links");
1139
            Message ("Delete soft links");
1113
        }
1140
        }
-
 
1141
 
-
 
1142
        if ( index( $data, ',ForceSuck,' ) >= 0) {
-
 
1143
            $opt_forceSuck = 1;
-
 
1144
            Message ("Force sucking empty directories");
1114
        
1145
        }
-
 
1146
 
1115
        if ( index( $data, ',IgnoreProjectBase,' ) >= 0) {
1147
        if ( index( $data, ',IgnoreProjectBase,' ) >= 0) {
1116
            $opt_ignoreProjectBaseErrors = 1;
1148
            $opt_ignoreProjectBaseErrors = 1;
1117
            Message ("Ignore ProjectBase Errors");
1149
            Message ("Ignore ProjectBase Errors");
1118
        }
1150
        }
1119
 
1151
 
Line 1252... Line 1284...
1252
            {
1284
            {
1253
                my $ep = $versions{$entry};
1285
                my $ep = $versions{$entry};
1254
                unless ( $ep->{last} || $ep->{next}[0] )
1286
                unless ( $ep->{last} || $ep->{next}[0] )
1255
                {
1287
                {
1256
#                    if (  $ep->{isaWip}  )
1288
#                    if (  $ep->{isaWip}  )
1257
                    if ( (exists $ep->{badVcsTag} && $ep->{badVcsTag}) || $ep->{isaWip}  )
1289
                    if ( (!$opt_IgnoreBadSourcePath  && (exists $ep->{badVcsTag}  && $ep->{badVcsTag})) || $ep->{isaWip} )
1258
                    {
1290
                    {
1259
                        $ep->{badSingleton} = 1;
1291
                        $ep->{badSingleton} = 1;
1260
                        $reprocess = 1;
1292
                        $reprocess = 1;
1261
                        $badSingletonCount++;
1293
                        $badSingletonCount++;
1262
 
1294
 
Line 1272... Line 1304...
1272
            calcLinks()
1304
            calcLinks()
1273
                if ( $reprocess );
1305
                if ( $reprocess );
1274
        }
1306
        }
1275
 
1307
 
1276
        #
1308
        #
-
 
1309
        #   True Patches show up as singletons - they have no parent
-
 
1310
        #   Need to create strands of patches to be glued onto the base
-
 
1311
        #
-
 
1312
        {
-
 
1313
            my %patchTree;
-
 
1314
            my $patchSeen;
-
 
1315
            Message ("Creating patch threads");
-
 
1316
            foreach my $entry ( sort {$versions{$a}{version} cmp $versions{$b}{version}} @startPoints )
-
 
1317
            {
-
 
1318
                my $ep = $versions{$entry};
-
 
1319
                next unless ( defined $ep->{buildVersion} );
-
 
1320
 
-
 
1321
                my $suffix = $ep->{name} . $ep->{suffix};
-
 
1322
 
-
 
1323
                my ($major, $minor, $patch, $build) = @{$ep->{buildVersion}};
-
 
1324
 
-
 
1325
                my $patchBase = sprintf ("%3.3d.%3.3d.%3.3d.$suffix", $major, $minor, $patch);
-
 
1326
                
-
 
1327
                if ( defined $ep->{buildVersion} )
-
 
1328
                {
-
 
1329
                    if ( $ep->{isaPatch} )
-
 
1330
                    {
-
 
1331
                        push @{$patchTree{$patchBase}}, $entry;
-
 
1332
                        $ep->{patchRoot} = $patchBase;
-
 
1333
                        $patchSeen++;
-
 
1334
                    }
-
 
1335
                }
-
 
1336
            }
-
 
1337
 
-
 
1338
            my %patchRoot;
-
 
1339
            if ($patchSeen)
-
 
1340
            {
-
 
1341
                foreach my $entry ( sort {$versions{$a}{version} cmp $versions{$b}{version}} keys %versions )
-
 
1342
                {
-
 
1343
                    my $ep = $versions{$entry};
-
 
1344
                    next if ( $ep->{isaPatch} );
-
 
1345
                    next unless ( defined $ep->{buildVersion} );
-
 
1346
 
-
 
1347
                    my $suffix = $ep->{name} . $ep->{suffix};
-
 
1348
                    my ($major, $minor, $patch, $build) = @{$ep->{buildVersion}};
-
 
1349
                    my $patchBase = sprintf ("%3.3d.%3.3d.%3.3d.$suffix", $major, $minor, $patch);
-
 
1350
 
-
 
1351
                    if ( defined $patchRoot{$patchBase})
-
 
1352
                    {
-
 
1353
                        Warning ("Multiple Patch Roots identified", $versions{$patchRoot{$patchBase}}{vname},$ep->{vname}, "Both hash to: " . $patchBase );
-
 
1354
                    }
-
 
1355
                    else
-
 
1356
                    {
-
 
1357
                        $patchRoot{$patchBase} = $entry;
-
 
1358
                    }
-
 
1359
                }
-
 
1360
 
-
 
1361
#DebugDumpData('%patchRoot', \%patchRoot );
-
 
1362
                foreach  ( keys %patchTree )
-
 
1363
                {
-
 
1364
                    my $last;
-
 
1365
                    foreach my $entry ( sort {$versions{$a}{version} cmp $versions{$b}{version}} @{$patchTree{$_}} )
-
 
1366
                    {
-
 
1367
                        if ( $last )
-
 
1368
                        {
-
 
1369
                            $versions{$last}{MakeTree} = 1;
-
 
1370
                            push @{$versions{$last}{next}}, $entry;
-
 
1371
                            $reprocess = 1;
-
 
1372
                        }
-
 
1373
                        else
-
 
1374
                        {
-
 
1375
                            # First entry in thread.
-
 
1376
 
-
 
1377
# print "--- Patch Branch $versions{$entry}{vname}\n";
-
 
1378
                            $versions{$entry}{branchPoint} = 2;
-
 
1379
                            
-
 
1380
 
-
 
1381
                            my $patchBase = $versions{$entry}{patchRoot};
-
 
1382
                            my $patchBaseEntry = $patchRoot{$patchBase};
-
 
1383
                            if ( $patchBase )
-
 
1384
                            {
-
 
1385
 
-
 
1386
                                if ( defined($patchBaseEntry) && exists ($versions{$patchBaseEntry}) )
-
 
1387
                                {
-
 
1388
                                    push @{$versions{$patchBaseEntry}{next}}, $entry;
-
 
1389
#    Message( "Attaching ",$versions{$entry}{version}," to $patchBase");
-
 
1390
                                }
-
 
1391
                                else
-
 
1392
                                {
-
 
1393
    Message( "Cannot Attach ",$versions{$entry}{version}," to $patchBase" );
-
 
1394
                                    Warning ("Cannot attach thread. No base version");
-
 
1395
                                }
-
 
1396
                            }
-
 
1397
                        }
-
 
1398
                        $last = $entry;
-
 
1399
                    }
-
 
1400
                }
-
 
1401
            }
-
 
1402
            calcLinks()
-
 
1403
                if ( $reprocess );
-
 
1404
        }
-
 
1405
#DebugDumpData('$verions', \%versions );
-
 
1406
 
-
 
1407
        #
1277
        #   Create simple trees out of the chains
1408
        #   Create simple trees out of the chains
1278
        #   Tree is based on suffix (project) and version
1409
        #   Tree is based on suffix (project) and version
1279
        #
1410
        #
1280
        {
1411
        {
1281
            my %trees;
1412
            my %trees;
Line 1287... Line 1418...
1287
            }
1418
            }
1288
 
1419
 
1289
            foreach  ( keys %trees )
1420
            foreach  ( keys %trees )
1290
            {
1421
            {
1291
                my $last;
1422
                my $last;
1292
                foreach my $entry ( sort { $versions{$a}{version} cmp $versions{$b}{version}  } @{$trees{$_}} )
1423
                foreach my $entry ( sort {$versions{$a}{version} cmp $versions{$b}{version}} @{$trees{$_}} )
1293
                {
1424
                {
1294
                    if ( $last )
1425
                    if ( $last )
1295
                    {
1426
                    {
1296
                        $versions{$last}{MakeTree} = 1;
1427
                        $versions{$last}{MakeTree} = 1;
1297
                        push @{$versions{$last}{next}}, $entry;
1428
                        push @{$versions{$last}{next}}, $entry;
Line 1834... Line 1965...
1834
    #   Display warnings about Bad Essential Packages
1965
    #   Display warnings about Bad Essential Packages
1835
    #
1966
    #
1836
    $allSvn = 1;
1967
    $allSvn = 1;
1837
    foreach my $entry ( keys(%versions) )
1968
    foreach my $entry ( keys(%versions) )
1838
    {
1969
    {
-
 
1970
        markDpkgArchive($entry);
1839
        $rippleCount++ if ( exists($versions{$entry}{isaRipple}) && $versions{$entry}{isaRipple} );
1971
        $rippleCount++ if ( exists($versions{$entry}{isaRipple}) && $versions{$entry}{isaRipple} );
1840
        $allSvn = 0 unless ( $versions{$entry}{isSvn} );
1972
        $allSvn = 0 unless ( $versions{$entry}{isSvn} );
1841
        next unless ( exists $versions{$entry}{Essential}  );
1973
        next unless ( exists $versions{$entry}{Essential}  );
1842
        next unless ( $versions{$entry}{badVcsTag}  );
1974
        next unless ( $versions{$entry}{badVcsTag}  );
1843
        push @badEssentials, $entry;
1975
        push @badEssentials, $entry;
1844
        Warning ("BadVCS Essential: " . GetVname($entry))
1976
        Warning ("BadVCS Essential: " . GetVname($entry));
1845
    }
1977
    }
1846
 
1978
 
1847
    #
1979
    #
1848
    #   All done
1980
    #   All done
1849
    #
1981
    #
Line 2361... Line 2493...
2361
#        $data->{errStr} = 'Package is DeadWood';
2493
#        $data->{errStr} = 'Package is DeadWood';
2362
#        return 3;
2494
#        return 3;
2363
#    }
2495
#    }
2364
 
2496
 
2365
    #
2497
    #
-
 
2498
    #   Check for a handcrafted substitute package
2366
    #   Determine version information
2499
    #       May have been created with gen_cots
2367
    #
2500
    #
2368
    $data->{tag} = $versions{$entry}{vcsTag} || '';
2501
    testDpkgArchive($entry);
2369
    if ( $versions{$entry}{badVcsTag} )
2502
    if (extractFilesFromStore($data, $entry) )
2370
    {
2503
    {
2371
        Warning ("Error: Bad VcsTag for: " . GetVname($entry),
-
 
2372
                 "Tag: $data->{tag}" );
2504
        Message ("Using package from store");
2373
        $data->{errStr} = 'VCS Tag Marked as Bad';
-
 
2374
        return 1;
-
 
2375
 
-
 
2376
    }
2505
    }
2377
 
-
 
2378
 
-
 
2379
    $data->{tag} =~ m~^(.+?)::(.*?)(::(.+))?$~;
-
 
2380
    $vcs_type = $1;
-
 
2381
    $cc_label = $4;
2506
    else
2382
    $cc_path = $2;
-
 
2383
    $cc_path = '/' . $cc_path;
-
 
2384
    $cc_path =~ tr~\\/~/~s;
-
 
2385
    $cc_path_original = $cc_path;
-
 
2386
 
-
 
2387
    #
2507
    {
2388
    #   Correct well known path mistakes in CC paths
-
 
2389
    #
2508
        #
2390
    if ( $vcs_type eq 'CC' )
2509
        #   Determine version information
2391
    {
2510
        #
2392
        $cc_path =~ s~/build.pl$~~i;
-
 
2393
        $cc_path =~ s~/src$~~i;
2511
        if ($opt_IgnoreBadSourcePath)
2394
        $cc_path =~ s~/cpp$~~i;
-
 
2395
        $cc_path =~ s~/MASS_Dev/Infra/~/MASS_Dev_Infra/~i;
-
 
2396
        $cc_path =~ s~/MASS_Dev/Tools/~/MASS_Dev_Tools/~i;
-
 
2397
        $cc_path =~ s~/MASS_Dev/Bus/~/MASS_Dev_Bus/~i;
-
 
2398
        $cc_path =~ s~/MASS_Dev_Bus/Cbp/~/MASS_Dev_Bus/CBP/~i;
-
 
2399
        $cc_path =~ s~/MREF_Package/ergpostmongui$~/MREF_Package/ergpostmongui~i;
-
 
2400
        $cc_path =~ s~/MREF_../MREF_Package/~/MREF_Package/~i;
-
 
2401
        $cc_path =~ s~/MREF_Package/mass_ergocdp/~/MREF_Package/ergocdp/~i;
-
 
2402
        $cc_path =~ s~/MASS_Dev_Bus/CBP/systemCD.ejb~/MASS_Dev_Bus/CBP/systemCD/ejb~i;
-
 
2403
        $cc_path =~ s~/MASS_Dev_Bus/Financial/cpp/paymentmanager~/MASS_Dev_Bus/Financial/cpp/paymentmanager~i;
-
 
2404
        $cc_path =~ s~/MASS_Dev_Bus/WebServices~/MASS_Dev_Bus/WebServices~i;
-
 
2405
        $cc_path =~ s~/MASS_Dev_Bus/CBP/nullAdapter~//MASS_Dev_Bus/CBP/nullAdaptor~i;
-
 
2406
        $cc_path =~ s~/DPG_SWBase/Services~/DPG_SWBase/services~i;
-
 
2407
 
-
 
2408
 
-
 
2409
        $cc_path = '/MASS_Dev_Bus/Application' if ( $versions{$entry}{name} eq 'application');
-
 
2410
        $cc_path = '/MASS_Dev_Bus/Product'     if ( $versions{$entry}{name} eq 'product');
-
 
2411
        $cc_path = '/MASS_Dev_Bus/Financial'   if ( $versions{$entry}{name} eq 'FinRun');
-
 
2412
 
-
 
2413
        $cc_path = '/MASS_Dev_Bus' if ( $cc_path =~ m~/MASS_Dev_Bus/ImageCapture(/|$)~i );
-
 
2414
        $cc_path = '/MASS_Dev_Bus' if ( $cc_path =~ m~/MASS_Dev_Bus/ImageCapture(/|$)~i );
-
 
2415
        $cc_path = '/MASS_Dev_Bus/CBP/enquiry' if ( $versions{$entry}{name} eq 'EJBEnqPxyConnector');
-
 
2416
        $cc_path = '/MASS_Dev_Bus/CBP/enquiry' if ( $versions{$entry}{name} eq 'proxyif4j');
-
 
2417
        $cc_path = '/MASS_Dev_Bus' if ( $versions{$entry}{name} eq 'ImageCaptureTomcatDeployment');
-
 
2418
        $cc_path = '/MASS_Dev_Bus/WebServices/MassWS' if ( $versions{$entry}{name} eq 'MassWebServicesImpl');
-
 
2419
 
-
 
2420
        if (   $versions{$entry}{name} =~ m/^ERGagency$/i
-
 
2421
            || $versions{$entry}{name} =~ m/^ERGavm$/i
-
 
2422
            || $versions{$entry}{name} =~ m/^ERGboi$/i
-
 
2423
            || $versions{$entry}{name} =~ m/^ERGcallcenter$/i
-
 
2424
            || $versions{$entry}{name} =~ m/^ERGcardholder$/i
-
 
2425
            || $versions{$entry}{name} =~ m/^ERGcdaimports$/i
-
 
2426
            || $versions{$entry}{name} =~ m/^ERGcda$/i
-
 
2427
            || $versions{$entry}{name} =~ m/^ERGcscedit$/i
-
 
2428
            || $versions{$entry}{name} =~ m/^ERGcs$/i
-
 
2429
            || $versions{$entry}{name} =~ m/^ERGofs$/i
-
 
2430
            || $versions{$entry}{name} =~ m/^ERGols$/i
-
 
2431
            || $versions{$entry}{name} =~ m/^ERGtpf$/i
-
 
2432
            || $versions{$entry}{name} =~ m/^ERGorasys$/i
-
 
2433
            || $versions{$entry}{name} =~ m/^ERGoracs$/i
-
 
2434
            || $versions{$entry}{name} =~ m/^ERGpxyif$/i
-
 
2435
            || $versions{$entry}{name} =~ m/^ERGtp5upg$/i
-
 
2436
            || $versions{$entry}{name} =~ m/^ERGinstitutional$/i
-
 
2437
            || $versions{$entry}{name} =~ m/^ERGinfra$/i
-
 
2438
            || $versions{$entry}{name} =~ m/^ERGcrrpts$/i
-
 
2439
            || $versions{$entry}{name} =~ m/^ERGmiddle$/i
-
 
2440
            || $versions{$entry}{name} =~ m/^ERGmiddleapi$/i
-
 
2441
            || $versions{$entry}{name} =~ m/^ERGwebapi$/i
-
 
2442
            || $versions{$entry}{name} =~ m/^ERGwebtestui$/i
-
 
2443
            || $versions{$entry}{name} =~ m/^ERGwebesbui$/i
-
 
2444
            || $versions{$entry}{name} =~ m/^ERGwspiv$/i
-
 
2445
            || $versions{$entry}{name} =~ m/^ERGwscst$/i
-
 
2446
            || $versions{$entry}{name} =~ m/^sposMUG$/i
-
 
2447
            || $versions{$entry}{name} =~ m/^ERGfinman$/i
-
 
2448
            || $versions{$entry}{name} =~ m/^ERGkm$/i
-
 
2449
            || $versions{$entry}{name} =~ m/^ERGxml$/i
-
 
2450
            || $versions{$entry}{name} =~ m/^ERGoradacw$/i
-
 
2451
            || $versions{$entry}{name} =~ m/^ERGtru$/i
-
 
2452
            )
-
 
2453
        {
2512
        {
-
 
2513
            # Ignore versions tagged with a bad source path
-
 
2514
            #   Will expect that the Vob will be forced
2454
            $cc_path = '/MREF_Package';
2515
            #   Hope that we have a label
-
 
2516
            delete $versions{$entry}{badVcsTag};
2455
        }
2517
        }
2456
 
2518
 
-
 
2519
        $data->{tag} = $versions{$entry}{vcsTag} || '';
2457
        if (   $versions{$entry}{name} =~ m/^tp5000_MUG$/i )
2520
        if ( $versions{$entry}{badVcsTag} )
2458
        {
2521
        {
2459
            if ( $versions{$entry}{version} =~ m~vtk$~ )
2522
            Warning ("Error: Bad VcsTag for: " . GetVname($entry),
2460
            {
2523
                     "Tag: $data->{tag}" );
2461
                $cc_path = '/MREF_Package';
2524
            $data->{errStr} = 'VCS Tag Marked as Bad';
2462
            }
2525
            return 1;
-
 
2526
 
2463
        }
2527
        }
2464
 
2528
 
2465
        $cc_path = $opt_forceProjectBase
-
 
2466
            if ( $opt_forceProjectBase );
-
 
2467
 
2529
 
-
 
2530
        $data->{tag} =~ m~^(.+?)::(.*?)(::(.+))?$~;
-
 
2531
        $vcs_type = $1;
-
 
2532
        $cc_label = $4;
-
 
2533
        $cc_path = $2;
-
 
2534
        $cc_path = '/' . $cc_path;
-
 
2535
        $cc_path =~ tr~\\/~/~s;
-
 
2536
        $cc_path_original = $cc_path;
-
 
2537
 
-
 
2538
        #
-
 
2539
        #   Process IgnoreBadSourcePath
-
 
2540
        #
2468
        foreach ( @opt_limitProjectBase )
2541
        if ($opt_IgnoreBadSourcePath)
2469
        {
2542
        {
2470
            if ( $cc_path =~ m~$_~ )
2543
            if (($vcs_type eq 'UC') || (length($cc_label) < 1))
2471
            {
2544
            {
-
 
2545
                $versions{$entry}{badVcsTag} = 98;
-
 
2546
                Warning ("Error: Bad VcsTag for: " . GetVname($entry),
-
 
2547
                         "Tag: $data->{tag}" );
-
 
2548
                $data->{errStr} = 'VCS Tag Marked as Bad - and has no label';
2472
                $cc_path = $_;
2549
                return 1;
-
 
2550
            }
-
 
2551
        }
-
 
2552
 
-
 
2553
        #
-
 
2554
        #   Correct well known path mistakes in CC paths
-
 
2555
        #
-
 
2556
        if ( $vcs_type eq 'CC' )
-
 
2557
        {
-
 
2558
            $cc_path =~ s~/build.pl$~~i;
-
 
2559
            $cc_path =~ s~/src$~~i;
-
 
2560
            $cc_path =~ s~/cpp$~~i;
-
 
2561
            $cc_path =~ s~/MASS_Dev/Infra/~/MASS_Dev_Infra/~i;
-
 
2562
            $cc_path =~ s~/MASS_Dev/Tools/~/MASS_Dev_Tools/~i;
-
 
2563
            $cc_path =~ s~/MASS_Dev/Bus/~/MASS_Dev_Bus/~i;
-
 
2564
            $cc_path =~ s~/MASS_Dev_Bus/Cbp/~/MASS_Dev_Bus/CBP/~i;
-
 
2565
            $cc_path =~ s~/MREF_Package/ergpostmongui$~/MREF_Package/ergpostmongui~i;
-
 
2566
            $cc_path =~ s~/MREF_../MREF_Package/~/MREF_Package/~i;
-
 
2567
            $cc_path =~ s~/MREF_Package/mass_ergocdp/~/MREF_Package/ergocdp/~i;
-
 
2568
            $cc_path =~ s~/MASS_Dev_Bus/CBP/systemCD.ejb~/MASS_Dev_Bus/CBP/systemCD/ejb~i;
-
 
2569
            $cc_path =~ s~/MASS_Dev_Bus/Financial/cpp/paymentmanager~/MASS_Dev_Bus/Financial/cpp/paymentmanager~i;
-
 
2570
            $cc_path =~ s~/MASS_Dev_Bus/WebServices~/MASS_Dev_Bus/WebServices~i;
-
 
2571
            $cc_path =~ s~/MASS_Dev_Bus/CBP/nullAdapter~//MASS_Dev_Bus/CBP/nullAdaptor~i;
-
 
2572
            $cc_path =~ s~/DPG_SWBase/Services~/DPG_SWBase/services~i;
-
 
2573
 
-
 
2574
 
-
 
2575
            $cc_path = '/MASS_Dev_Bus/Application' if ( $versions{$entry}{name} eq 'application');
-
 
2576
            $cc_path = '/MASS_Dev_Bus/Product'     if ( $versions{$entry}{name} eq 'product');
-
 
2577
            $cc_path = '/MASS_Dev_Bus/Financial'   if ( $versions{$entry}{name} eq 'FinRun');
-
 
2578
 
-
 
2579
            $cc_path = '/MASS_Dev_Bus' if ( $cc_path =~ m~/MASS_Dev_Bus/ImageCapture(/|$)~i );
-
 
2580
            $cc_path = '/MASS_Dev_Bus' if ( $cc_path =~ m~/MASS_Dev_Bus/ImageCapture(/|$)~i );
-
 
2581
            $cc_path = '/MASS_Dev_Bus/CBP/enquiry' if ( $versions{$entry}{name} eq 'EJBEnqPxyConnector');
-
 
2582
            $cc_path = '/MASS_Dev_Bus/CBP/enquiry' if ( $versions{$entry}{name} eq 'proxyif4j');
-
 
2583
            $cc_path = '/MASS_Dev_Bus' if ( $versions{$entry}{name} eq 'ImageCaptureTomcatDeployment');
-
 
2584
            $cc_path = '/MASS_Dev_Bus/WebServices/MassWS' if ( $versions{$entry}{name} eq 'MassWebServicesImpl');
-
 
2585
 
-
 
2586
            if (   $versions{$entry}{name} =~ m/^ERGagency$/i
-
 
2587
                || $versions{$entry}{name} =~ m/^ERGavm$/i
-
 
2588
                || $versions{$entry}{name} =~ m/^ERGboi$/i
-
 
2589
                || $versions{$entry}{name} =~ m/^ERGcallcenter$/i
-
 
2590
                || $versions{$entry}{name} =~ m/^ERGcardholder$/i
-
 
2591
                || $versions{$entry}{name} =~ m/^ERGcdaimports$/i
-
 
2592
                || $versions{$entry}{name} =~ m/^ERGcda$/i
-
 
2593
                || $versions{$entry}{name} =~ m/^ERGcscedit$/i
-
 
2594
                || $versions{$entry}{name} =~ m/^ERGcs$/i
-
 
2595
                || $versions{$entry}{name} =~ m/^ERGofs$/i
-
 
2596
                || $versions{$entry}{name} =~ m/^ERGols$/i
-
 
2597
                || $versions{$entry}{name} =~ m/^ERGtpf$/i
-
 
2598
                || $versions{$entry}{name} =~ m/^ERGorasys$/i
-
 
2599
                || $versions{$entry}{name} =~ m/^ERGoracs$/i
-
 
2600
                || $versions{$entry}{name} =~ m/^ERGpxyif$/i
-
 
2601
                || $versions{$entry}{name} =~ m/^ERGtp5upg$/i
-
 
2602
                || $versions{$entry}{name} =~ m/^ERGinstitutional$/i
-
 
2603
                || $versions{$entry}{name} =~ m/^ERGinfra$/i
-
 
2604
                || $versions{$entry}{name} =~ m/^ERGcrrpts$/i
-
 
2605
                || $versions{$entry}{name} =~ m/^ERGmiddle$/i
-
 
2606
                || $versions{$entry}{name} =~ m/^ERGmiddleapi$/i
-
 
2607
                || $versions{$entry}{name} =~ m/^ERGwebapi$/i
-
 
2608
                || $versions{$entry}{name} =~ m/^ERGwebtestui$/i
-
 
2609
                || $versions{$entry}{name} =~ m/^ERGwebesbui$/i
-
 
2610
                || $versions{$entry}{name} =~ m/^ERGwspiv$/i
-
 
2611
                || $versions{$entry}{name} =~ m/^ERGwscst$/i
-
 
2612
                || $versions{$entry}{name} =~ m/^sposMUG$/i
-
 
2613
                || $versions{$entry}{name} =~ m/^ERGfinman$/i
-
 
2614
                || $versions{$entry}{name} =~ m/^ERGkm$/i
-
 
2615
                || $versions{$entry}{name} =~ m/^ERGxml$/i
-
 
2616
                || $versions{$entry}{name} =~ m/^ERGoradacw$/i
-
 
2617
                || $versions{$entry}{name} =~ m/^ERGtru$/i
2473
                last;
2618
                )
-
 
2619
            {
-
 
2620
                $cc_path = '/MREF_Package';
2474
            }
2621
            }
2475
        }
-
 
2476
 
2622
 
2477
        if ( $cc_path_original ne $cc_path )
2623
            if (   $versions{$entry}{name} =~ m/^tp5000_MUG$/i )
2478
        {
2624
            {
2479
                Message ("Package: $versions{$entry}{name}. Forcing CC path to: $cc_path" );
2625
                if ( $versions{$entry}{version} =~ m~vtk$~ )
2480
        }
2626
                {
-
 
2627
                    $cc_path = '/MREF_Package';
2481
    }
2628
                }
2482
    
2629
            }
2483
#print "--- Path: $cc_path, Label: $cc_label\n";
-
 
2484
 
2630
 
2485
    if ( $vcs_type eq 'SVN' )
-
 
2486
    {
-
 
2487
        $rv = extractFilesFromSubversion( $data, $entry );
-
 
2488
        return $rv if ( $rv );
-
 
2489
    }
-
 
2490
    else
-
 
2491
    {
-
 
2492
        #
-
 
2493
        #   Create CC view
-
 
2494
        #   Import into Subversion View
2631
            $cc_path = $opt_forceProjectBase
2495
        #
-
 
2496
        $rv = extractFilesFromClearCase( $data, $cc_path, $cc_label, $entry );
-
 
2497
        return $rv if ( $rv );
2632
                if ( $opt_forceProjectBase );
2498
 
2633
 
2499
        #
-
 
2500
        #   May need to limit the extracted source tree
-
 
2501
        #   Use the first selected directory that we have
-
 
2502
        #
-
 
2503
        if ( @opt_selectProjectBase )
-
 
2504
        {
-
 
2505
            foreach ( @opt_selectProjectBase )
2634
            foreach ( @opt_limitProjectBase )
2506
            {
2635
            {
2507
                my $testDir = join('/', $data->{ViewRoot}, $_);
-
 
2508
                if ( -d $testDir )
2636
                if ( $cc_path =~ m~$_~ )
2509
                {
2637
                {
2510
                    $selectDir = $_;
2638
                    $cc_path = $_;
2511
                    $data->{ViewPath} = $testDir;
-
 
2512
                    last;
2639
                    last;
2513
                }
2640
                }
2514
            }
2641
            }
2515
 
2642
 
2516
            unless ( $selectDir )
2643
            if ( $cc_path_original ne $cc_path )
2517
            {
2644
            {
2518
                Warning ("No directory selected from list");
2645
                    Message ("Package: $versions{$entry}{name}. Forcing CC path to: $cc_path" );
2519
            }
2646
            }
-
 
2647
        }
-
 
2648
    
-
 
2649
    #print "--- Path: $cc_path, Label: $cc_label\n";
-
 
2650
 
-
 
2651
        if ( $vcs_type eq 'SVN' )
-
 
2652
        {
-
 
2653
            $rv = extractFilesFromSubversion( $data, $entry );
-
 
2654
            return $rv if ( $rv );
-
 
2655
        }
-
 
2656
        else
-
 
2657
        {
2520
            else
2658
            #
-
 
2659
            #   Create CC view
-
 
2660
            #   Import into Subversion View
-
 
2661
            #
-
 
2662
            $rv = extractFilesFromClearCase( $data, $cc_path, $cc_label, $entry );
-
 
2663
            return $rv if ( $rv );
-
 
2664
 
-
 
2665
            #
-
 
2666
            #   May need to limit the extracted source tree
-
 
2667
            #   Use the first selected directory that we have
-
 
2668
            #
-
 
2669
            if ( @opt_selectProjectBase )
2521
            {
2670
            {
-
 
2671
                foreach ( @opt_selectProjectBase )
-
 
2672
                {
-
 
2673
                    my $testDir = join('/', $data->{ViewRoot}, $_);
-
 
2674
                    if ( -d $testDir )
-
 
2675
                    {
-
 
2676
                        $selectDir = $_;
-
 
2677
                        $data->{ViewPath} = $testDir;
-
 
2678
                        last;
-
 
2679
                    }
-
 
2680
                }
-
 
2681
 
-
 
2682
                unless ( $selectDir )
-
 
2683
                {
-
 
2684
                    Warning ("No directory selected from list");
-
 
2685
                }
-
 
2686
                else
-
 
2687
                {
2522
                Message ("Selecting Dir: /$selectDir");
2688
                    Message ("Selecting Dir: /$selectDir");
-
 
2689
                }
2523
            }
2690
            }
2524
        }
2691
        }
2525
    }
2692
    }
2526
 
2693
 
2527
    #
2694
    #
Line 2558... Line 2725...
2558
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
2725
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
2559
    #
2726
    #
2560
    #   Attempt to suck up empty directories below the specified
2727
    #   Attempt to suck up empty directories below the specified
2561
    #   source path
2728
    #   source path
2562
    #
2729
    #
2563
    unless ( $opt_preserveProjectBase || $opt_forceProjectBase || @opt_limitProjectBase || $selectDir)
2730
    unless (($opt_preserveProjectBase || $opt_forceProjectBase || @opt_limitProjectBase || $selectDir) && ! $opt_forceSuck)
2564
    {
2731
    {
2565
        #
2732
        #
2566
        #   Look in ViewPath
2733
        #   Look in ViewPath
2567
        #   If it contains only ONE directory then we can suck it up
2734
        #   If it contains only ONE directory then we can suck it up
2568
        #
2735
        #
Line 2581... Line 2748...
2581
    #
2748
    #
2582
    #   Check for bad source paths
2749
    #   Check for bad source paths
2583
    #
2750
    #
2584
    if (detectBadMakePaths($data) )
2751
    if (detectBadMakePaths($data) )
2585
    {
2752
    {
-
 
2753
        $count_BadPaths++;
2586
        unless ( $opt_ignoreBadPaths )
2754
        unless ( $opt_ignoreBadPaths )
2587
        {
2755
        {
2588
            $data->{BadPath}++;
2756
            $data->{BadPath}++;
2589
            $data->{errStr} = 'Bad Paths in Makefile';
2757
            $data->{errStr} = 'Bad Paths in Makefile';
2590
            return 4;           # Lets see what the others look like too
2758
            return 4;           # Lets see what the others look like too
Line 2983... Line 3151...
2983
#                   Perform the calculation to determine the details of
3151
#                   Perform the calculation to determine the details of
2984
#                   the branch point. The work will only be done when its
3152
#                   the branch point. The work will only be done when its
2985
#                   needed. This will avoid the creation of branchpoints
3153
#                   needed. This will avoid the creation of branchpoints
2986
#                   that are not used.
3154
#                   that are not used.
2987
#
3155
#
2988
# Inputs          : $entry                  Entry being processed
3156
# Inputs          : $entry          - Entry being processed
2989
#                   $author         - Who done it
3157
#                   $author         - Who done it
2990
#                   $date           - When
3158
#                   $date           - When
2991
#
3159
#
2992
# Returns         : 
3160
# Returns         : 
2993
#
3161
#
Line 3048... Line 3216...
3048
 
3216
 
3049
    #
3217
    #
3050
    #   Create target name
3218
    #   Create target name
3051
    #
3219
    #
3052
    my $tgt_label;
3220
    my $tgt_label;
-
 
3221
    if ($versions{$entry}{isaPatch} )
-
 
3222
    {
-
 
3223
        my $parent = $versions{$entry}{last};
-
 
3224
        my $pver = $versions{$parent}{vname};
-
 
3225
        $tgt_label = 'Patching_' . $pver;
-
 
3226
    }
3053
    if ( $forceNewProject || $versions{$entry}{newSuffix} || $createSuffix || !defined $src_label )
3227
    elsif ( $forceNewProject || $versions{$entry}{newSuffix} || $createSuffix || !defined $src_label )
3054
    {
3228
    {
3055
        #
3229
        #
3056
        #   Create target name based on project
3230
        #   Create target name based on project
3057
        #
3231
        #
3058
        return if ( $singleProject );
3232
        return if ( $singleProject );
Line 3068... Line 3242...
3068
            #
3242
            #
3069
            if ( $Projects{$suffix}{Trunk} )
3243
            if ( $Projects{$suffix}{Trunk} )
3070
            {
3244
            {
3071
                # This project can use the trunk, if it has not been allocated.
3245
                # This project can use the trunk, if it has not been allocated.
3072
                $ProjectTrunk = $suffix unless ( defined $ProjectTrunk );
3246
                $ProjectTrunk = $suffix unless ( defined $ProjectTrunk );
3073
                
3247
#                Message ("ProjectTrunk allocated to: $ProjectTrunk");
3074
                #
3248
                #
3075
                #   If this package has multiple instances of the potential
3249
                #   If this package has multiple instances of the potential
3076
                #   trunk, then don't place either of them on the trunk as it
3250
                #   trunk, then don't place either of them on the trunk as it
3077
                #   may cause confusion
3251
                #   may cause confusion
3078
                #
3252
                #
Line 3116... Line 3290...
3116
 
3290
 
3117
    #
3291
    #
3118
    #   Save branch name for use when populating sandbox
3292
    #   Save branch name for use when populating sandbox
3119
    #
3293
    #
3120
    $currentBranchName = $tgt_label;
3294
    $currentBranchName = $tgt_label;
-
 
3295
#    Message ("Setting currentBranchName: $currentBranchName");
3121
 
3296
 
3122
    #
3297
    #
3123
    #   Perform the branch
3298
    #   Perform the branch
3124
    #
3299
    #
3125
    if ( defined $src_label )
3300
    if ( defined $src_label )
Line 3235... Line 3410...
3235
    Warning ("Packages not processed: $notProcessedCount") if ( $notProcessedCount );
3410
    Warning ("Packages not processed: $notProcessedCount") if ( $notProcessedCount );
3236
    Warning ("Internal Errors: $inernalErrorCount") if ( $inernalErrorCount );
3411
    Warning ("Internal Errors: $inernalErrorCount") if ( $inernalErrorCount );
3237
    Warning ("Multiple source paths", @multiplePaths ) if ( scalar @multiplePaths > 1 );
3412
    Warning ("Multiple source paths", @multiplePaths ) if ( scalar @multiplePaths > 1 );
3238
    Message ("Packages Relabled: $packageReLabelCount") if ( $packageReLabelCount );
3413
    Message ("Packages Relabled: $packageReLabelCount") if ( $packageReLabelCount );
3239
    Warning ("Packages with Bad Paths: $badPathCount") if ( $badPathCount );
3414
    Warning ("Packages with Bad Paths: $badPathCount") if ( $badPathCount );
-
 
3415
    Warning ("Packages with Ignored Bad Paths: $badPathCount") if ( $count_BadPaths );
-
 
3416
 
3240
    Warning ("Packages with Bad ProjectBase: $badProjectBaseCount") if ( $badProjectBaseCount );
3417
    Warning ("Packages with Bad ProjectBase: $badProjectBaseCount") if ( $badProjectBaseCount );
3241
    Warning ("Packages with MakeProjects: $badMakeProjectCount") if ( $badMakeProjectCount );
3418
    Warning ("Packages with MakeProjects: $badMakeProjectCount") if ( $badMakeProjectCount );
3242
    Warning ("Build File Clashes Found: $buildFileClashes") if ( $buildFileClashes );
3419
    Warning ("Build File Clashes Found: $buildFileClashes") if ( $buildFileClashes );
3243
    Warning ("Global Error Detected") if ( $globalError );
3420
    Warning ("Global Error Detected") if ( $globalError );
3244
    Message ("---- All Done -----");
3421
    Message ("---- All Done -----");
Line 3313... Line 3490...
3313
                my $cc_vob = $cc_path;
3490
                my $cc_vob = $cc_path;
3314
                $cc_vob =~ s~^/~~;
3491
                $cc_vob =~ s~^/~~;
3315
                $cc_vob =~ s~/.*~~;
3492
                $cc_vob =~ s~/.*~~;
3316
                my $detarPath =  $data->{ViewRoot} . '/' . $cc_vob;
3493
                my $detarPath =  $data->{ViewRoot} . '/' . $cc_vob;
3317
 
3494
 
3318
                Error ("Logic error: Did not de-tar into expected location", $detarPath)
-
 
3319
                    unless ( -d $detarPath  );
-
 
3320
 
3495
 
3321
                if ( -d $data->{ViewPath}  )
3496
                unless ( -d $detarPath  )
3322
                {
3497
                {
3323
                    # All is good
3498
                    Warning ("Logic error: Did not de-tar into expected location", $detarPath)
3324
                    return 0;
-
 
3325
                }
3499
                }
-
 
3500
                else
-
 
3501
                {
-
 
3502
                    if ( -d $data->{ViewPath}  )
-
 
3503
                    {
-
 
3504
                        # All is good
-
 
3505
                        return 0;
-
 
3506
                    }
3326
 
3507
 
3327
                # Recalc ViewPath to the root of the VOB
3508
                    # Recalc ViewPath to the root of the VOB
3328
                $cc_path =~ s~^/~~;
3509
                    $cc_path =~ s~^/~~;
3329
                $cc_path =~ s~/.*~~;
3510
                    $cc_path =~ s~/.*~~;
3330
                $cc_path = '/' . $cc_path;
3511
                    $cc_path = '/' . $cc_path;
3331
                $data->{ViewPath} =  $data->{ViewRoot} . $cc_path;
3512
                    $data->{ViewPath} =  $data->{ViewRoot} . $cc_path;
3332
 
-
 
3333
                return 0;
3513
                    return 0;
-
 
3514
                }
3334
            }
3515
            }
3335
        }
3516
        }
3336
    }
3517
    }
3337
 
3518
 
3338
    if ( $opt_reuse && -d $data->{ViewPath}  )
3519
    if ( $opt_reuse && -d $data->{ViewPath}  )
Line 3346... Line 3527...
3346
#        print FH $versions{$entry}{name},' ',$versions{$entry}{vname},"\n";
3527
#        print FH $versions{$entry}{name},' ',$versions{$entry}{vname},"\n";
3347
#        close FH;
3528
#        close FH;
3348
        return 0;
3529
        return 0;
3349
    }
3530
    }
3350
 
3531
 
3351
    while ( $rv == 99 ) {
3532
    while ( ($rv == 99)  && ! $opt_noVCS) {
3352
        my @args;
3533
        my @args;
3353
        push (@args, '-view', $opt_name ) if ( defined $opt_name && ! defined $opt_mergePackages );
3534
        push (@args, '-view', $opt_name ) if ( defined $opt_name && ! defined $opt_mergePackages );
3354
        $rv = JatsToolPrint ( 'jats_ccrelease', '-extractfiles', '-root=.' , '-noprefix',
3535
        $rv = JatsToolPrint ( 'jats_ccrelease', '-extractfiles', '-root=.' , '-noprefix',
3355
                    "-label=$cc_label" ,
3536
                    "-label=$cc_label" ,
3356
                    "-path=$cc_path",
3537
                    "-path=$cc_path",
Line 3508... Line 3689...
3508
    #
3689
    #
3509
    return 0;
3690
    return 0;
3510
}
3691
}
3511
 
3692
 
3512
#-------------------------------------------------------------------------------
3693
#-------------------------------------------------------------------------------
-
 
3694
# Function        : extractFilesFromStore
-
 
3695
#
-
 
3696
# Description     : Extract files from Store
-
 
3697
#                   Locaal directory under dpkgExtract
-
 
3698
#
-
 
3699
# Inputs          : $data           - Hash of good stuff from newPackageVersionBody
-
 
3700
#                   $entry          - All the PV information
-
 
3701
#
-
 
3702
# Returns         : exit code
-
 
3703
#                       1 - Files found
-
 
3704
#                       0 - Not found
-
 
3705
#
-
 
3706
sub extractFilesFromStore
-
 
3707
{
-
 
3708
    my ($data, $entry ) = @_;
-
 
3709
    #
-
 
3710
    #   Create a nice name for the import
-
 
3711
    #
-
 
3712
    my $import_label = saneLabel($entry);
-
 
3713
 
-
 
3714
    $data->{ViewRoot} = ( defined $opt_name && ! defined $opt_mergePackages )? $opt_name : $import_label;
-
 
3715
    $data->{ViewPath} =  'dpkgExtract/' . $data->{ViewRoot};
-
 
3716
    $data->{ViewPath} =~  tr~/~/~s;
-
 
3717
    
-
 
3718
    if ( -d $data->{ViewPath}  )
-
 
3719
    {
-
 
3720
        $data->{fromStore} = 1;
-
 
3721
        Message ("Reusing Stored view: $import_label");
-
 
3722
        return 1;
-
 
3723
    }
-
 
3724
 
-
 
3725
    #
-
 
3726
    #   Not found in store
-
 
3727
    #
-
 
3728
    delete $data->{ViewRoot};
-
 
3729
    delete $data->{ViewPath};
-
 
3730
    return 0;
-
 
3731
}
-
 
3732
 
-
 
3733
#-------------------------------------------------------------------------------
-
 
3734
# Function        : testDpkgArchive
-
 
3735
#
-
 
3736
# Description     : Indicate if the package exists in dpkg_archive
-
 
3737
#
-
 
3738
# Inputs          : 
-
 
3739
#
-
 
3740
# Returns         : 
-
 
3741
#
-
 
3742
sub testDpkgArchive
-
 
3743
{
-
 
3744
    my ($entry) = @_;
-
 
3745
    my $vname = $versions{$entry}{vname};
-
 
3746
 
-
 
3747
    if ( -d join('/', $ENV{GBE_DPKG}, $packageNames, $vname )) {
-
 
3748
        Message ("Version found in dpkg_archive");
-
 
3749
    } else {
-
 
3750
        Message ("Version NOT found in dpkg_archive");
-
 
3751
    }
-
 
3752
}
-
 
3753
 
-
 
3754
#-------------------------------------------------------------------------------
-
 
3755
# Function        : markDpkgArchive
-
 
3756
#
-
 
3757
# Description     : Indicate if the package exists in dpkg_archive
-
 
3758
#
-
 
3759
# Inputs          : 
-
 
3760
#
-
 
3761
# Returns         : 
-
 
3762
#
-
 
3763
sub markDpkgArchive
-
 
3764
{
-
 
3765
    my ($entry) = @_;
-
 
3766
    my $vname = $versions{$entry}{vname};
-
 
3767
    my $path = join('/', $ENV{GBE_DPKG}, $packageNames, $vname );
-
 
3768
    delete $versions{$entry}{dpkgArchive};
-
 
3769
    if ( -d $path ) {
-
 
3770
        $versions{$entry}{dpkgArchive} = $path;
-
 
3771
    }
-
 
3772
}
-
 
3773
 
-
 
3774
#-------------------------------------------------------------------------------
3513
# Function        : detectMakeProjectUsage
3775
# Function        : detectMakeProjectUsage
3514
#
3776
#
3515
# Description     : etect and report usage of the MakeProject directive
3777
# Description     : etect and report usage of the MakeProject directive
3516
#
3778
#
3517
# Inputs          : $data               - Ref to a hash of bits
3779
# Inputs          : $data               - Ref to a hash of bits
Line 4365... Line 4627...
4365
                    #
4627
                    #
4366
                    next if ( $pkg_ver eq '23.23.23.ssw' );
4628
                    next if ( $pkg_ver eq '23.23.23.ssw' );
4367
 
4629
 
4368
                    #
4630
                    #
4369
                    #   Add data to the hash
4631
                    #   Add data to the hash
4370
                    #       Remove entries that address themselves
-
 
4371
                    #
4632
                    #
4372
                    push (@{$versions{$last_pv_id}{next}}, $pv_id) unless ($pv_id == $last_pv_id || $last_pv_id == 0) ;
-
 
4373
                    $versions{$pv_id}{name} = $pkg_name;
4633
                    $versions{$pv_id}{name} = $pkg_name;
4374
                    $versions{$pv_id}{pvid} = $pv_id;
4634
                    $versions{$pv_id}{pvid} = $pv_id;
4375
                    $versions{$pv_id}{vname} = $pkg_ver;
4635
                    $versions{$pv_id}{vname} = $pkg_ver;
4376
                    $versions{$pv_id}{vcsTag} = $vcstag;
4636
                    $versions{$pv_id}{vcsTag} = $vcstag;
4377
                    $versions{$pv_id}{created} = $created;
4637
                    $versions{$pv_id}{created} = $created;
Line 4385... Line 4645...
4385
                    examineVcsTag($pv_id);
4645
                    examineVcsTag($pv_id);
4386
 
4646
 
4387
                    #
4647
                    #
4388
                    #   Process version number
4648
                    #   Process version number
4389
                    #
4649
                    #
4390
                    my ($suffix, $version, $isaR, $isaWip, $buildVersion ) = massageVersion($pkg_ver, $pkg_name);
4650
                    my ($suffix, $version, $isaR, $isaWip, $buildVersion, $isaPatch ) = massageVersion($pkg_ver, $pkg_name);
4391
 
4651
 
4392
                    $versions{$pv_id}{version} = $version;
4652
                    $versions{$pv_id}{version} = $version;
4393
                    $versions{$pv_id}{buildVersion} = $buildVersion;
4653
                    $versions{$pv_id}{buildVersion} = $buildVersion;
4394
                    $versions{$pv_id}{isaWip} = 1 if ( $isaWip );
4654
                    $versions{$pv_id}{isaWip} = 1 if ( $isaWip );
-
 
4655
                    $versions{$pv_id}{isaPatch} = 1 if ( $isaPatch );
-
 
4656
 
-
 
4657
                    # Remove entries that address themselves
-
 
4658
                    push (@{$versions{$last_pv_id}{next}}, $pv_id) unless ($pv_id == $last_pv_id || $last_pv_id == 0 || $isaPatch) ;
-
 
4659
                    
4395
 
4660
 
4396
                    #
4661
                    #
4397
                    #   New method for detecting a ripple
4662
                    #   New method for detecting a ripple
4398
                    #       Don't look at the version number
4663
                    #       Don't look at the version number
4399
                    #       Use RM data
4664
                    #       Use RM data
Line 4450... Line 4715...
4450
    my ($major, $minor, $patch, $build, $suffix);
4715
    my ($major, $minor, $patch, $build, $suffix);
4451
    my $result;
4716
    my $result;
4452
    my $buildVersion;
4717
    my $buildVersion;
4453
    my $isaRipple;
4718
    my $isaRipple;
4454
    my $isaWIP;
4719
    my $isaWIP;
-
 
4720
    my $isaPatch;
4455
    $build = 0;
4721
    $build = 0;
4456
 
4722
 
4457
#print "--- $name, $version\n";
4723
#print "--- $name, $version\n";
4458
    $version =~ s~^_~~;
4724
    $version =~ s~^_~~;
4459
    $version =~ s~^${name}_~~;
4725
    $version =~ s~^${name}_~~;
Line 4491... Line 4757...
4491
        $minor = $2;
4757
        $minor = $2;
4492
        $patch = $3;
4758
        $patch = $3;
4493
        $build = $4;
4759
        $build = $4;
4494
        $suffix = defined $6 ? ".$6" : '';
4760
        $suffix = defined $6 ? ".$6" : '';
4495
        $isaRipple = 0;
4761
        $isaRipple = 0;
-
 
4762
        $isaPatch = 1;
4496
    }
4763
    }
4497
    #
4764
    #
4498
    #       nn.nnn.nnnnn.xxx
4765
    #       nn.nnn.nnnnn.xxx
4499
    #       nn.nnn.nnnnn-xxx
4766
    #       nn.nnn.nnnnn-xxx
4500
    #       nnn.nnn.nnnx.xxx
4767
    #       nnn.nnn.nnnx.xxx
Line 4555... Line 4822...
4555
        $major = $1;
4822
        $major = $1;
4556
        $minor = $2;
4823
        $minor = $2;
4557
        $patch = 0;
4824
        $patch = 0;
4558
        $suffix = $3;
4825
        $suffix = $3;
4559
    }
4826
    }
-
 
4827
 
-
 
4828
    #
-
 
4829
    #       nnn.nnn.c.xxx
-
 
4830
    #
-
 
4831
    elsif ( $version =~ m~^(\d+)\.(\d+)\.(\w)(\.\w+)$~ ) {
-
 
4832
        $major = $1;
-
 
4833
        $minor = $2;
-
 
4834
        $patch = ord($3);
-
 
4835
        $suffix = $4;
-
 
4836
    }
-
 
4837
    
4560
    
4838
    
4561
    #
4839
    #
4562
    #       nnn.nnn.nnnz
4840
    #       nnn.nnn.nnnz
4563
    #
4841
    #
4564
    elsif ( $version =~ m~^(\d+)\.(\d+)\.(\d+)([a-z])$~ ) {
4842
    elsif ( $version =~ m~^(\d+)\.(\d+)\.(\d+)([a-z])$~ ) {
Line 4572... Line 4850...
4572
    #
4850
    #
4573
    #       ???REV=???
4851
    #       ???REV=???
4574
    #
4852
    #
4575
    elsif ( $version =~ m~REV=~ ) {
4853
    elsif ( $version =~ m~REV=~ ) {
4576
        $suffix = '.cots';
4854
        $suffix = '.cots';
4577
        $result = $version . '.0000.cots';
4855
        $result = $version . '.000000.cots';
4578
    }
4856
    }
4579
 
4857
 
4580
    #
4858
    #
4581
    #   Wip Packages
4859
    #   Wip Packages
4582
    #   (nnnnnn).xxx
4860
    #   (nnnnnn).xxx
4583
    #   Should be essential, but want to sort very low
4861
    #   Should be essential, but want to sort very low
4584
    #
4862
    #
4585
    elsif ($version =~ m~\((.*)\)(\..*)?~) {
4863
    elsif ($version =~ m~\((.*)\)(\..*)?~) {
4586
        $suffix = $2 || '';
4864
        $suffix = $2 || '';
4587
        $result = "000.000.000.000$suffix";
4865
        $result = "000.000.000.00000$suffix";
4588
        $isaWIP = 1;
4866
        $isaWIP = 1;
4589
    }
4867
    }
4590
 
4868
 
4591
    #
4869
    #
4592
    #   !current
4870
    #   !current
4593
    #
4871
    #
4594
    elsif ($version eq '!current' || $version eq 'current_$USER' || $version eq 'current' || $version eq 'beta' || $version eq 'latest' || $version eq 'beta.cr' || $version eq 'CREATE') {
4872
    elsif ($version eq '!current' || $version eq 'current_$USER' || $version eq 'current' || $version eq 'beta' || $version eq 'latest' || $version eq 'beta.cr' || $version eq 'CREATE') {
4595
        $suffix = '';
4873
        $suffix = '';
4596
        $result = "000.000.000.000$suffix";
4874
        $result = "000.000.000.00000$suffix";
4597
        $isaWIP = 1;
4875
        $isaWIP = 1;
4598
    }
4876
    }
4599
    
4877
    
4600
    #
4878
    #
4601
    #   Also WIP: FINRUN.103649.BEI.WIP
4879
    #   Also WIP: FINRUN.103649.BEI.WIP
4602
    elsif ($version =~ m~(\.[a-zA-Z]+)\.WIP$~) {
4880
    elsif ($version =~ m~(\.[a-zA-Z]+)\.WIP$~) {
4603
        $suffix = lc($1);
4881
        $suffix = lc($1);
4604
        $result = "000.000.000.000$suffix";
4882
        $result = "000.000.000.00000$suffix";
4605
        $isaWIP = 1;
4883
        $isaWIP = 1;
4606
    }
4884
    }
4607
 
4885
 
4608
    #
4886
    #
4609
    #   Also ERGOFSSLS190100_015
4887
    #   Also ERGOFSSLS190100_015
Line 4638... Line 4916...
4638
            $major = 0;
4916
            $major = 0;
4639
            $minor = 0;
4917
            $minor = 0;
4640
            $patch = 0;
4918
            $patch = 0;
4641
        }
4919
        }
4642
        
4920
        
4643
        $result = sprintf("%3.3d.%3.3d.%3.3d.%3.3d%s", $major,$minor,$patch,$build,$suffix || '.0000');
4921
        $result = sprintf("%3.3d.%3.3d.%3.3d.%5.5d%s", $major,$minor,$patch,$build,$suffix || '.0000');
4644
        $buildVersion = [ $major, $minor, $patch, $build ];
4922
        $buildVersion = [ $major, $minor, $patch, $build ];
4645
    }
4923
    }
4646
 
4924
 
4647
    $suffix = lc( $suffix );
4925
    $suffix = lc( $suffix );
4648
    if ( exists $suffixFixup{$suffix} )
4926
    if ( exists $suffixFixup{$suffix} )
4649
    {
4927
    {
4650
        $suffix = $suffixFixup{$suffix} ;
4928
        $suffix = $suffixFixup{$suffix} ;
4651
    }
4929
    }
4652
 
4930
 
4653
    return ($suffix, $result, $isaRipple, $isaWIP, $buildVersion );
4931
    return ($suffix, $result, $isaRipple, $isaWIP, $buildVersion, $isaPatch );
4654
}
4932
}
4655
 
4933
 
4656
#-------------------------------------------------------------------------------
4934
#-------------------------------------------------------------------------------
4657
# Function        : vcsCleanup
4935
# Function        : vcsCleanup
4658
#
4936
#
Line 4852... Line 5130...
4852
        #
5130
        #
4853
        if ( scalar @multiplePaths > 1 )
5131
        if ( scalar @multiplePaths > 1 )
4854
        {
5132
        {
4855
            push @text, '|';
5133
            push @text, '|';
4856
            push @text, 'Multiple Paths';
5134
            push @text, 'Multiple Paths';
-
 
5135
            if ( $opt_AllowMuliplePaths )
-
 
5136
            {
-
 
5137
                push @text, 'Multiple Paths allowed:' . scalar @multiplePaths . ' found';
-
 
5138
            }
-
 
5139
            else
-
 
5140
            {
4857
            push @text, @multiplePaths;
5141
                push @text, @multiplePaths;
-
 
5142
            }
4858
        }
5143
        }
4859
 
5144
 
4860
        #
5145
        #
4861
        #   Bad essentials
5146
        #   Bad essentials
4862
        #
5147
        #
Line 4910... Line 5195...
4910
        push @text, '(Coded information)';
5195
        push @text, '(Coded information)';
4911
        push @text, '|{Code';
5196
        push @text, '|{Code';
4912
        push @text, '|{N: Not Locked';
5197
        push @text, '|{N: Not Locked';
4913
        push @text, 'b: Bad Singleton';
5198
        push @text, 'b: Bad Singleton';
4914
        push @text, 'B: Bad VCS Tag';
5199
        push @text, 'B: Bad VCS Tag';
-
 
5200
        push @text, 'd: Package in dpkg_archive';
4915
        push @text, 'D: DeadWood';
5201
        push @text, 'D: DeadWood';
4916
        push @text, 'E: Essential Release Version';
5202
        push @text, 'E: Essential Release Version';
4917
        push @text, 'F: Package directories labled';
5203
        push @text, 'F: Package directories labled';
4918
        push @text, 'G: Glued into Version Tree';
5204
        push @text, 'G: Glued into Version Tree';
4919
        push @text, 'L: Label not in VOB';
5205
        push @text, 'L: Label not in VOB';
-
 
5206
        push @text, 'p: Is a Patch';
4920
        push @text, 'r: Recent version';
5207
        push @text, 'r: Recent version';
4921
        push @text, 'R: Ripple';
5208
        push @text, 'R: Ripple';
4922
        push @text, 'S: Splitpoint';
5209
        push @text, 'S: Splitpoint';
4923
        push @text, 't: Glued into Project Tree';
5210
        push @text, 't: Glued into Project Tree';
4924
        push @text, 'T: Tip version';
5211
        push @text, 'T: Tip version';
Line 4990... Line 5277...
4990
        $stateText .= 'b' if (exists $versions{$entry}{badSingleton});
5277
        $stateText .= 'b' if (exists $versions{$entry}{badSingleton});
4991
        $stateText .= 'B' if (exists $versions{$entry}{badVcsTag});
5278
        $stateText .= 'B' if (exists $versions{$entry}{badVcsTag});
4992
        $stateText .= 'G' if (exists $versions{$entry}{GluedIn});
5279
        $stateText .= 'G' if (exists $versions{$entry}{GluedIn});
4993
        $stateText .= 't' if (exists $versions{$entry}{MakeTree});
5280
        $stateText .= 't' if (exists $versions{$entry}{MakeTree});
4994
        $stateText .= 'E' if (exists $versions{$entry}{Essential});
5281
        $stateText .= 'E' if (exists $versions{$entry}{Essential});
-
 
5282
        $stateText .= 'd' if (exists $versions{$entry}{dpkgArchive});
4995
        $stateText .= 'D' if (exists $versions{$entry}{DeadWood});
5283
        $stateText .= 'D' if (exists $versions{$entry}{DeadWood});
-
 
5284
        $stateText .= 'p' if ( $versions{$entry}{isaPatch} );
4996
        $stateText .= 'R' if ( $versions{$entry}{isaRipple} );
5285
        $stateText .= 'R' if ( $versions{$entry}{isaRipple} );
4997
        $stateText .= 'r' if (exists $versions{$entry}{keepRecent} && $versions{$entry}{keepRecent} );
5286
        $stateText .= 'r' if (exists $versions{$entry}{keepRecent} && $versions{$entry}{keepRecent} );
4998
        $stateText .= 'S' if (exists $versions{$entry}{EssentialSplitPoint} && $versions{$entry}{EssentialSplitPoint} > 1 );
5287
        $stateText .= 'S' if (exists $versions{$entry}{EssentialSplitPoint} && $versions{$entry}{EssentialSplitPoint} > 1 );
4999
        $stateText .= 'T' if (exists $versions{$entry}{Tip} );
5288
        $stateText .= 'T' if (exists $versions{$entry}{Tip} );
5000
        $stateText .= 'V' if (exists $versions{$entry}{isSvn} );
5289
        $stateText .= 'V' if (exists $versions{$entry}{isSvn} );
Line 5417... Line 5706...
5417
    #
5706
    #
5418
    #   Process data
5707
    #   Process data
5419
    foreach my $entry ( @svnDataItems )
5708
    foreach my $entry ( @svnDataItems )
5420
    {
5709
    {
5421
        my $name;
5710
        my $name;
5422
        my $isaBranch;
-
 
5423
        my $target = $entry->{'target'};
5711
        my $target = $entry->{'target'};
5424
        if ( $target =~ m~/tags/(.*)~ ) {
5712
        if ( $target =~ m~/tags/(.*)~ ) {
5425
            $name = $1;
5713
            $name = $1;
5426
            $svnData{tags}{$name} = 1;
5714
            $svnData{tags}{$name} = 1;
5427
        } elsif ( $target =~ m~/branches/(.*)~ )  {
5715
        } elsif ( $target =~ m~/branches/(.*)~ )  {