Subversion Repositories DevTools

Rev

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

Rev 2040 Rev 2429
Line 31... Line 31...
31
use JatsProperties;
31
use JatsProperties;
32
use JatsEnv;
32
use JatsEnv;
33
use ConfigurationFile;
33
use ConfigurationFile;
34
use JatsSvn qw(:All);
34
use JatsSvn qw(:All);
35
use JatsLocateFiles;
35
use JatsLocateFiles;
-
 
36
use Encode;
36
 
37
 
37
 
38
 
38
#use Data::Dumper;
39
#use Data::Dumper;
39
use Fcntl ':flock'; # import LOCK_* constants
40
use Fcntl ':flock'; # import LOCK_* constants
40
use Cwd;
41
use Cwd;
Line 66... Line 67...
66
my $opt_postimage = 1;
67
my $opt_postimage = 1;
67
my $opt_workDir = '/work';
68
my $opt_workDir = '/work';
68
my $opt_vobMap;
69
my $opt_vobMap;
69
my $opt_preserveProjectBase;
70
my $opt_preserveProjectBase;
70
my $opt_ignoreProjectBaseErrors;
71
my $opt_ignoreProjectBaseErrors;
-
 
72
my $opt_ignoreMakeProjectErrors;
71
my $opt_delete;
73
my $opt_delete;
72
my $opt_recentAge = 14;             # Days
74
my $opt_recentAge = 14;             # Days
-
 
75
my $opt_relabel = 0;
73
 
76
 
74
################################################################################
77
################################################################################
75
#   List of Projects Suffixes and Branch Names to be used within SVN
78
#   List of Projects Suffixes and Branch Names to be used within SVN
76
#
79
#
77
#       Name        - Name of branch for the project
80
#       Name        - Name of branch for the project
Line 102... Line 105...
102
    '.uk'       => { Name => 'UkProject' },
105
    '.uk'       => { Name => 'UkProject' },
103
    '.pmb'      => { Name => 'Pietermaritzburg' },
106
    '.pmb'      => { Name => 'Pietermaritzburg' },
104
    '.vps'      => { Name => 'VixPayments' },
107
    '.vps'      => { Name => 'VixPayments' },
105
    '.ncc'      => { Name => 'NSWClubCard' },
108
    '.ncc'      => { Name => 'NSWClubCard' },
106
    '.rm'       => { Name => 'Rome' },
109
    '.rm'       => { Name => 'Rome' },
-
 
110
    '.vss'      => { Name => 'SmartSite' },
107
    'unknown'   => { Name => 'UnknownProject' },
111
    'unknown'   => { Name => 'UnknownProject' },
108
 
112
 
109
    '.ebr'      => { Name => 'eBrio' , Trunk => 1 },
113
    '.ebr'      => { Name => 'eBrio' , Trunk => 1 },
110
    '.mas'      => { Name => 'Mass'  , Trunk => 1 },
114
    '.mas'      => { Name => 'Mass'  , Trunk => 1 },
111
    '.cr'       => { Name => 'Core'  , Trunk => 1 },
115
    '.cr'       => { Name => 'Core'  , Trunk => 1 },
Line 126... Line 130...
126
    '.pxxx.sydddd'  => '.syd',
130
    '.pxxx.sydddd'  => '.syd',
127
    '.oslo'         => '.oso',
131
    '.oslo'         => '.oso',
128
    '.osl'          => '.oso',
132
    '.osl'          => '.oso',
129
);
133
);
130
 
134
 
-
 
135
my @excludeFromImport = (
-
 
136
 
-
 
137
    # 22-Oct-12: Excluded on request from Kasun Sirikumara
-
 
138
    # Pending VSS work
-
 
139
    'agency_website',
-
 
140
    'alx',
-
 
141
    'alx-api',
-
 
142
    'cardholder_website',
-
 
143
    'loginmodule-ad',
-
 
144
    'ols-enquiry',
-
 
145
    'ols-enquiry-api',
-
 
146
    'olsrpc4j',
-
 
147
    'orca-middleware',
-
 
148
    'orca-middleware-api',
-
 
149
    'orca-salesEngine',
-
 
150
    'orca-web-api',
-
 
151
    'orca-web-utils',
-
 
152
    'TestPaymentGateway',
-
 
153
    'tgen4j',
-
 
154
    'web-cd-client',
-
 
155
 
-
 
156
 
-
 
157
    # 05-Nov-12: Pending fixup for include.txt files that escape the VOB
-
 
158
    #
-
 
159
#    'ddu_app_manager',
-
 
160
#    'ddu_dog',
-
 
161
#    'ddu_dog_lib',
-
 
162
#    'ddu_fim',
-
 
163
#    'ddu_logging_lib',
-
 
164
#    'ddu_management',
-
 
165
#    'ddu_mccain',
-
 
166
#    'ddu_mon',
-
 
167
#    'ddu_rcu',
-
 
168
#    'ddu_status_logging',
-
 
169
    
-
 
170
);
-
 
171
 
131
my %specialPackages = (
172
my %specialPackages = (
132
    'core_devl' =>  ',all,protected,',
173
    'core_devl'           =>  ',all,protected,',
-
 
174
    'daf_utils_mos'       => ',flat,',
133
#    'core_devl' =>  ',all,',
175
    'mos_packager'        => ',all,',
-
 
176
    'cfmgr-cfmgr'         => ',flat,',
134
    'daf_utils_mos' => ',flat,',
177
    'daf_utils_button_st' => ',flat,',
135
    'mos_packager'  => ',all,',
178
    'ReleaseName'         => ',flat,',
-
 
179
    'reports'             => ',utf8,',
-
 
180
    'cda_imports'         => ',utf8,',
-
 
181
    'cdxforms'            => ',utf8,',
-
 
182
    'db_cda'              => ',utf8,',
-
 
183
    'CommandServer'       => ',IgnoreMakeProject,',
-
 
184
 
136
 
185
 
137
    # Need to be handled in a special manner
186
    # Need to be handled in a special manner
138
    # Not done by this utility
187
    # Not done by this utility
139
    #
188
    #
140
    'linux_drivers_eb5600'  => ',protected,',
189
    'linux_drivers_eb5600'  => ',protected,',
Line 150... Line 199...
150
    'DBA-Common'                => ',protected,',
199
    'DBA-Common'                => ',protected,',
151
    'DBA-DatabaseInstall'       => ',protected,',
200
    'DBA-DatabaseInstall'       => ',protected,',
152
    'DBA-ExternalPerlModules'   => ',protected,',
201
    'DBA-ExternalPerlModules'   => ',protected,',
153
    'DBA-OraUserBuild'          => ',protected,',
202
    'DBA-OraUserBuild'          => ',protected,',
154
    'DBA-OST'                   => ',protected,',
203
    'DBA-OST'                   => ',protected,',
155
    'orahops-install'           => ',protected,',
204
#    'orahops-install'           => ',protected,',
156
    'orahops-patch'             => ',protected,',
205
#    'orahops-patch'             => ',protected,',
157
    'orahops-ssw-install'       => ',protected,',
206
#    'orahops-ssw-install'       => ',protected,',
158
    'orahops-ssw-patch'         => ',protected,',
207
#    'orahops-ssw-patch'         => ',protected,',
159
# End of ukHops migration exclussion
208
# End of ukHops migration exclussion
160
 
209
 
161
    'ftp'                   => 'SetProjectBase,',
210
    'ftp'                   => 'SetProjectBase,',
-
 
211
    'ddu_app_manager'       => 'SetProjectBase,',
162
 
212
 
163
    'icl'                   => 'IgnoreProjectBase,',
213
    'icl'                   => 'IgnoreProjectBase,',
164
    'itso'                  => 'IgnoreProjectBase,',
214
    'itso'                  => 'IgnoreProjectBase,',
165
    'daf_osa_mos'           => 'IgnoreProjectBase,',
215
    'daf_osa_mos'           => 'IgnoreProjectBase,',
166
    'daf_utils_mos'         => 'IgnoreProjectBase,',
216
    'daf_utils_mos'         => 'IgnoreProjectBase,',
Line 234... Line 284...
234
my $allSvn;
284
my $allSvn;
235
my @multiplePaths;
285
my @multiplePaths;
236
my @badEssentials;
286
my @badEssentials;
237
my %svnData;
287
my %svnData;
238
my $cwd;
288
my $cwd;
-
 
289
my $mustConvertFileNames;
-
 
290
my $workDir;
239
 
291
 
240
my $packageNames;
292
my $packageNames;
241
my @packageNames;
293
my @packageNames;
242
my $multiPackages = -1;
294
my $multiPackages = -1;
243
my $visitId = 0;
295
my $visitId = 0;
Line 245... Line 297...
245
my $rippleCount = 0;
297
my $rippleCount = 0;
246
my $svnRepo;
298
my $svnRepo;
247
my $processCount = 0;
299
my $processCount = 0;
248
my $processTotal = 0;
300
my $processTotal = 0;
249
my $recentCount = 0;
301
my $recentCount = 0;
-
 
302
my $packageReLabelCount = 0;
-
 
303
my %saneLabels;
250
 
304
 
251
our $GBE_RM_URL;
305
our $GBE_RM_URL;
252
my $UNIX = $ENV{'GBE_UNIX'};
306
my $UNIX = $ENV{'GBE_UNIX'};
253
 
307
 
254
my $result = GetOptions (
308
my $result = GetOptions (
Line 270... Line 324...
270
                "tip:s"         => \@opt_tip,           # Force tip version(s)
324
                "tip:s"         => \@opt_tip,           # Force tip version(s)
271
                "log!"          => \$opt_log,
325
                "log!"          => \$opt_log,
272
                "delete!"       => \$opt_delete,
326
                "delete!"       => \$opt_delete,
273
                "postimage!"    => \$opt_postimage,
327
                "postimage!"    => \$opt_postimage,
274
                'workdir:s'     => \$opt_workDir,
328
                'workdir:s'     => \$opt_workDir,
-
 
329
                'relabel!'      => \$opt_relabel,
275
                );
330
                );
276
 
331
 
277
#
332
#
278
#   Process help and manual options
333
#   Process help and manual options
279
#
334
#
Line 436... Line 491...
436
    }
491
    }
437
 
492
 
438
    #
493
    #
439
    #   Perform all the work in a package specific subdirectory
494
    #   Perform all the work in a package specific subdirectory
440
    #
495
    #
441
    my $workDir = $opt_workDir . '/' . $packageNames;
496
    $workDir = $opt_workDir . '/' . $packageNames;
442
    mkdir $workDir unless ( -d $workDir );
497
    mkdir $workDir unless ( -d $workDir );
443
    chdir $workDir || Error ("Cannot cd to $workDir");
498
    chdir $workDir || Error ("Cannot cd to $workDir");
444
 
499
 
445
    #
500
    #
446
    #   Process all packages
501
    #   Process all packages
Line 580... Line 635...
580
    }
635
    }
581
 
636
 
582
    #
637
    #
583
    #   Some packages are special
638
    #   Some packages are special
584
    #
639
    #
-
 
640
    if ( $svnRepo =~ m~/Manufacturing(/|$)~ )
-
 
641
    {
-
 
642
        Message ("Set Manufacturing Repo style");
-
 
643
        $opt_flat = 1;
-
 
644
        setPruneMode('none') unless (defined $opt_pruneModeString);
-
 
645
    }
-
 
646
 
585
 
647
 
586
    if ( $packageNames[0] =~ m'^br_applet_' )
648
    if ( $packageNames[0] =~ m'^br_applet_' )
587
    {
649
    {
588
        $opt_flat = 1 unless defined $opt_flat;
650
      $opt_flat = 1 unless defined $opt_flat;
-
 
651
    }
-
 
652
 
-
 
653
    foreach  ( @excludeFromImport )
-
 
654
    {
-
 
655
         $specialPackages{$_} .= 'protected,';
589
    }
656
    }
590
 
657
 
591
    if ( exists $specialPackages{$packageNames[0]} )
658
    if ( exists $specialPackages{$packageNames[0]} )
592
    {
659
    {
593
        my $data = $specialPackages{$packageNames[0]};
660
        my $data = $specialPackages{$packageNames[0]};
Line 612... Line 679...
612
        if ( index( $data, 'IgnoreProjectBase,' ) >= 0) {
679
        if ( index( $data, 'IgnoreProjectBase,' ) >= 0) {
613
            $opt_ignoreProjectBaseErrors = 1;
680
            $opt_ignoreProjectBaseErrors = 1;
614
            Message ("Ignore ProjectBase Errors");
681
            Message ("Ignore ProjectBase Errors");
615
        }
682
        }
616
 
683
 
-
 
684
        if ( index( $data, 'IgnoreMakeProject,' ) >= 0) {
-
 
685
            $opt_ignoreMakeProjectErrors = 1;
-
 
686
            Message ("Ignore MakeProject Usage");
-
 
687
        }
-
 
688
        
-
 
689
 
-
 
690
        if ( index( $data, 'utf8,' ) >= 0) {
-
 
691
            $mustConvertFileNames = 1;
-
 
692
            Message ("Convert filenames to UTF8");
-
 
693
        }
617
    }
694
    }
618
 
695
 
619
    Message("Package Type: $packageType, $pruneModeString");
696
    Message("Package Type: $packageType, $pruneModeString");
620
}
697
}
621
 
698
 
Line 1562... Line 1639...
1562
    #   Delete the created view
1639
    #   Delete the created view
1563
    #   Its just a directory, so delete it
1640
    #   Its just a directory, so delete it
1564
    #
1641
    #
1565
    if ( $data{ViewRoot} && -d $data{ViewRoot})
1642
    if ( $data{ViewRoot} && -d $data{ViewRoot})
1566
    {
1643
    {
1567
        if ( !$opt_reuse || $rv )
1644
        if ( !$opt_reuse || ($rv && ($rv != 4 && $rv != 12 )) )
1568
        {
1645
        {
1569
            Message ("Delete View: $data{ViewRoot}");
1646
            Message ("Delete View: $data{ViewRoot}");
1570
            RmDirTree ($data{ViewRoot} );
1647
            RmDirTree ($data{ViewRoot} );
1571
        }
1648
        }
1572
        else
1649
        else
Line 1584... Line 1661...
1584
    #
1661
    #
1585
    #   If this version has any 'ripples' then process them while we have the
1662
    #   If this version has any 'ripples' then process them while we have the
1586
    #   main view. Note the ripple list may contain entries that do not
1663
    #   main view. Note the ripple list may contain entries that do not
1587
    #   exist - they will have been pruned.
1664
    #   exist - they will have been pruned.
1588
    #
1665
    #
1589
if(0) {
1666
if(1) {
1590
    foreach my $rentry ( @{$versions{$entry}{rippleList}} )
1667
    foreach my $rentry ( @{$versions{$entry}{rippleList}} )
1591
    {
1668
    {
1592
        next unless( exists $versions{$rentry} );
1669
        next unless( exists $versions{$rentry} );
1593
 
1670
 
1594
        if ($versions{$rentry}{Processed})
1671
        if ($versions{$rentry}{Processed})
Line 1622... Line 1699...
1622
{
1699
{
1623
    my ($data, $entry) = @_;
1700
    my ($data, $entry) = @_;
1624
    my $rv;
1701
    my $rv;
1625
    my $cc_label;
1702
    my $cc_label;
1626
    my $cc_path;
1703
    my $cc_path;
-
 
1704
    my $cc_path_original;
1627
 
1705
 
1628
    #
1706
    #
1629
    #   Init Data
1707
    #   Init Data
1630
    #
1708
    #
1631
    $data->{rmRef} = 'ERROR';
1709
    $data->{rmRef} = 'ERROR';
Line 1664... Line 1742...
1664
    $data->{tag} =~ m~^(.+?)::(.*?)(::(.+))?$~;
1742
    $data->{tag} =~ m~^(.+?)::(.*?)(::(.+))?$~;
1665
    $cc_label = $4;
1743
    $cc_label = $4;
1666
    $cc_path = $2;
1744
    $cc_path = $2;
1667
    $cc_path = '/' . $cc_path;
1745
    $cc_path = '/' . $cc_path;
1668
    $cc_path =~ tr~\\/~/~s;
1746
    $cc_path =~ tr~\\/~/~s;
-
 
1747
    $cc_path_original = $cc_path;
1669
 
1748
 
1670
    #
1749
    #
1671
    #   Correct well known path mistakes
1750
    #   Correct well known path mistakes
1672
    #
1751
    #
-
 
1752
    $cc_path =~ s~/build.pl$~~i;
-
 
1753
    $cc_path =~ s~/src$~~i;
-
 
1754
    $cc_path =~ s~/cpp$~~i;
-
 
1755
    $cc_path =~ s~/MASS_Dev/Infra/~/MASS_Dev_Infra/~i;
-
 
1756
    $cc_path =~ s~/MASS_Dev/Tools/~/MASS_Dev_Tools/~i;
1673
    $cc_path =~ s~/MASS_Dev/Bus/~/MASS_Dev_Bus/~i;
1757
    $cc_path =~ s~/MASS_Dev/Bus/~/MASS_Dev_Bus/~i;
1674
    $cc_path =~ s~/MASS_Dev_Bus/Cbp/~/MASS_Dev_Bus/CBP/~i;
1758
    $cc_path =~ s~/MASS_Dev_Bus/Cbp/~/MASS_Dev_Bus/CBP/~i;
1675
    $cc_path =~ s~/MREF_Package/ergpostmongui$~/MREF_Package/ergpostmongui~i;
1759
    $cc_path =~ s~/MREF_Package/ergpostmongui$~/MREF_Package/ergpostmongui~i;
1676
    $cc_path =~ s~/MREF_21/MREF_Package/~/MREF_Package/~i;
1760
    $cc_path =~ s~/MREF_../MREF_Package/~/MREF_Package/~i;
-
 
1761
    $cc_path =~ s~/MREF_Package/mass_ergocdp/~/MREF_Package/ergocdp/~i;
-
 
1762
    $cc_path =~ s~/MASS_Dev_Bus/CBP/systemCD.ejb~/MASS_Dev_Bus/CBP/systemCD/ejb~i;
-
 
1763
    $cc_path =~ s~/MASS_Dev_Bus/Financial/cpp/paymentmanager~/MASS_Dev_Bus/Financial/cpp/paymentmanager~i;
-
 
1764
    $cc_path =~ s~/MASS_Dev_Bus/WebServices~/MASS_Dev_Bus/WebServices~i;
-
 
1765
    $cc_path =~ s~/MASS_Dev_Bus/CBP/nullAdapter~//MASS_Dev_Bus/CBP/nullAdaptor~i;
-
 
1766
 
-
 
1767
    $cc_path = '/MASS_Dev_Bus' if ( $cc_path =~ m~/MASS_Dev_Bus/ImageCapture(/|$)~i );
-
 
1768
    $cc_path = '/MASS_Dev_Bus/CBP/enquiry' if ( $versions{$entry}{name} eq 'EJBEnqPxyConnector');
-
 
1769
    $cc_path = '/MASS_Dev_Bus/CBP/enquiry' if ( $versions{$entry}{name} eq 'proxyif4j');
-
 
1770
    $cc_path = '/MASS_Dev_Bus' if ( $versions{$entry}{name} eq 'ImageCaptureTomcatDeployment');
-
 
1771
    $cc_path = '/MASS_Dev_Bus/WebServices/MassWS' if ( $versions{$entry}{name} eq 'MassWebServicesImpl');
-
 
1772
 
-
 
1773
    if (   $versions{$entry}{name} =~ m/^ERGagency$/i
-
 
1774
        || $versions{$entry}{name} =~ m/^ERGavm$/i
-
 
1775
        || $versions{$entry}{name} =~ m/^ERGboi$/i
-
 
1776
        || $versions{$entry}{name} =~ m/^ERGcallcenter$/i
-
 
1777
        || $versions{$entry}{name} =~ m/^ERGcardholder$/i
-
 
1778
        || $versions{$entry}{name} =~ m/^ERGcdaimports$/i
-
 
1779
        || $versions{$entry}{name} =~ m/^ERGcda$/i
-
 
1780
        || $versions{$entry}{name} =~ m/^ERGcscedit$/i
-
 
1781
        || $versions{$entry}{name} =~ m/^ERGcs$/i
-
 
1782
        || $versions{$entry}{name} =~ m/^ERGofs$/i
-
 
1783
        || $versions{$entry}{name} =~ m/^ERGols$/i
-
 
1784
        || $versions{$entry}{name} =~ m/^ERGtpf$/i
-
 
1785
        || $versions{$entry}{name} =~ m/^ERGorasys$/i
-
 
1786
        || $versions{$entry}{name} =~ m/^ERGoracs$/i
-
 
1787
        || $versions{$entry}{name} =~ m/^ERGpxyif$/i
-
 
1788
        || $versions{$entry}{name} =~ m/^ERGtp5upg$/i
-
 
1789
        || $versions{$entry}{name} =~ m/^ERGinstitutional$/i
-
 
1790
        || $versions{$entry}{name} =~ m/^ERGinfra$/i
-
 
1791
        || $versions{$entry}{name} =~ m/^ERGcrrpts$/i
-
 
1792
        || $versions{$entry}{name} =~ m/^ERGmiddle$/i
-
 
1793
        || $versions{$entry}{name} =~ m/^ERGmiddleapi$/i
-
 
1794
        || $versions{$entry}{name} =~ m/^ERGwebapi$/i
-
 
1795
        || $versions{$entry}{name} =~ m/^ERGwebtestui$/i
-
 
1796
        || $versions{$entry}{name} =~ m/^ERGwebesbui$/i
-
 
1797
        || $versions{$entry}{name} =~ m/^ERGwspiv$/i
-
 
1798
        || $versions{$entry}{name} =~ m/^ERGwscst$/i
-
 
1799
        || $versions{$entry}{name} =~ m/^sposMUG$/i
-
 
1800
        || $versions{$entry}{name} =~ m/^ERGfinman$/i
-
 
1801
        || $versions{$entry}{name} =~ m/^ERGkm$/i
-
 
1802
        || $versions{$entry}{name} =~ m/^ERGxml$/i
-
 
1803
        || $versions{$entry}{name} =~ m/^ERGoradacw$/i
-
 
1804
        || $versions{$entry}{name} =~ m/^ERGtru$/i
-
 
1805
        )
-
 
1806
    {
-
 
1807
        $cc_path = '/MREF_Package';
-
 
1808
    }
1677
 
1809
 
-
 
1810
    if (   $versions{$entry}{name} =~ m/^tp5000_MUG$/i )
-
 
1811
    {
-
 
1812
        if ( $versions{$entry}{version} =~ m~vtk$~ )
-
 
1813
        {
-
 
1814
            $cc_path = '/MREF_Package';
-
 
1815
        }
-
 
1816
    }
1678
 
1817
 
-
 
1818
    if ( $cc_path_original ne $cc_path )
-
 
1819
    {
-
 
1820
            Message ("Package: $versions{$entry}{name}. Forcing CC path to: $cc_path" );
-
 
1821
    }
-
 
1822
    
1679
#print "--- Path: $cc_path, Label: $cc_label\n";
1823
#print "--- Path: $cc_path, Label: $cc_label\n";
1680
 
1824
 
1681
    #
1825
    #
1682
    #   Create CC view
1826
    #   Create CC view
1683
    #   Import into Subversion View
1827
    #   Import into Subversion View
1684
    #
1828
    #
1685
    $data->{ViewRoot} = $opt_name ? $opt_name : "$cc_label";
1829
    $rv = extractFilesFromClearCase( $data, $cc_path, $cc_label );
1686
    $data->{ViewPath} =  $data->{ViewRoot} . $cc_path;
-
 
1687
 
-
 
1688
    if ( $opt_preserveProjectBase )
-
 
1689
    {
-
 
1690
        my $cc_vob = $cc_path;
1830
    return $rv if ( $rv );
1691
        $cc_vob =~ s~^/~~;
-
 
1692
        $cc_vob =~ s~/.*~~;
-
 
1693
        $data->{ViewPath} =  $data->{ViewRoot} . '/' . $cc_vob;
-
 
1694
        Message ("Preserving Project Base");
-
 
1695
    }
-
 
1696
    $data->{ViewPath} =~  tr~/~/~s;
-
 
1697
 
1831
 
1698
    if ( $opt_reuse && -d $data->{ViewPath}  )
-
 
1699
    {
1832
    #
1700
        Message ("Reusing view: $cc_label");
1833
    #   Developers have been slack
-
 
1834
    #       Sometime the mark the source path as 'GMTPE2005'
-
 
1835
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
1701
    }
1836
    #
-
 
1837
    #   Attempt to suck up empty directories below the specified
-
 
1838
    #   source path
1702
    else
1839
    #
-
 
1840
    unless ( $opt_preserveProjectBase )
1703
    {
1841
    {
1704
        my @args;
1842
        #
1705
        push (@args, '-view', $opt_name ) if ( defined $opt_name );
-
 
1706
        $rv = JatsToolPrint ( 'jats_ccrelease', '-extractfiles', '-root=.' , '-noprefix',
-
 
1707
                    "-label=$cc_label" ,
1843
        #   Look in ViewPath
1708
                    "-path=$cc_path",
1844
        #   If it contains only ONE directory then we can suck it up
1709
                    @args
1845
        #
1710
                    );
1846
        my $testDir = findDirWithStuff( $data->{ViewPath} );
1711
 
1847
 
1712
        unless ( -d $data->{ViewPath}  )
1848
        unless ( $data->{ViewPath} eq $testDir  )
1713
        {
1849
        {
-
 
1850
            Message ("Adjust Base Dir: $testDir");
1714
            $data->{errStr} = 'Failed to extract files from CC';
1851
            $data->{adjustedPath} = $data->{ViewPath};
1715
            return 2;
1852
            $data->{ViewPath} = $testDir;
1716
        }
1853
        }
1717
    }
1854
    }
1718
 
-
 
1719
 
1855
    
1720
    #
1856
    #
1721
    #   Some really ugly packages make use of a Jats feature called 'SetProjectBase'
1857
    #   Some really ugly packages make use of a Jats feature called 'SetProjectBase'
1722
    #   Detect such packages as we will need to handle them differently
1858
    #   Detect such packages as we will need to handle them differently
1723
    #   Can't really handle it on the fly
1859
    #   Can't really handle it on the fly
1724
    #   All we can do is detect it and report it - at the moment
1860
    #   All we can do is detect it and report it - at the moment
Line 1727... Line 1863...
1727
    {
1863
    {
1728
        unless ( $opt_ignoreProjectBaseErrors )
1864
        unless ( $opt_ignoreProjectBaseErrors )
1729
        {
1865
        {
1730
            $data->{BadProjectBase}++;
1866
            $data->{BadProjectBase}++;
1731
            $data->{errStr} = 'Bad usage of ProjectBase detected';
1867
            $data->{errStr} = 'Bad usage of ProjectBase detected';
-
 
1868
            return 4;           # Lets see what the others look like too
1732
            return 14;
1869
#            return 14;
1733
        }
1870
        }
1734
    }
1871
    }
1735
 
1872
 
1736
 
-
 
1737
    #
1873
    #
-
 
1874
    #   Some really really ugly packgaes make use of the MakeProject directive
-
 
1875
    #   and then use an 'include.txt file to access paths all over the VOB
1738
    #   Developers have been slack
1876
    #   The problem is with lines like
-
 
1877
    #           /I ..\..\..\..\..\..\DPG_SWCode\projects\seattle\ddu\component\DTIApp\dsi\inc
-
 
1878
    #   Two problems:
1739
    #       Sometime the mark the source path as 'GMTPE2005'
1879
    #       Vob Name is not a part of the migration
1740
    #       Sometimes as 'GMTPE2005/Package/Fred/Jill/Harry'
1880
    #       If we 'SuckUp' empty directories then this may break
-
 
1881
    #       the pathing.
-
 
1882
    #   All we can do is detect it and report it - at the moment
1741
    #
1883
    #
-
 
1884
    if (detectMakeProjectUsage($data, $cc_path) )
-
 
1885
    {
-
 
1886
        unless ( $opt_ignoreMakeProjectErrors )
-
 
1887
        {
-
 
1888
            $data->{BadMakeProject}++;
-
 
1889
            $data->{errStr} = 'Use of MakeProject detected';
1742
    #   Attempt to suck up empty directories below the specified
1890
            return 4;           # Lets see what the others look like too
1743
    #   source path
1891
#            return 14;
-
 
1892
        }
-
 
1893
    }
-
 
1894
 
1744
    #
1895
    #
-
 
1896
    #   Some packages have filenames that are need to be converted
-
 
1897
    #
1745
    unless ( $opt_preserveProjectBase )
1898
    if ( $mustConvertFileNames  )
1746
    {
1899
    {
-
 
1900
        $rv = system ( '/home/dpurdie/svn/tools/convmv-1.15/convmv',
-
 
1901
                 '-fiso-8859-1',
-
 
1902
                 '-tutf8',
-
 
1903
                 '-r',
-
 
1904
                 '--notest',
-
 
1905
                 $data->{ViewPath} );
-
 
1906
 
-
 
1907
        if ( $rv )
-
 
1908
        {
-
 
1909
            $data->{errStr} = 'Failed to convert filenames to UTF8';
-
 
1910
            return 14;
-
 
1911
        }
-
 
1912
 
1747
        #
1913
        #
1748
        #   Look in ViewPath
1914
        #   Check to see if our ViewPath has been changed
1749
        #   If it contains only ONE directory then we can suck it up
1915
        #   If so, then try to fix it
1750
        #
1916
        #
1751
        my $testDir = findDirWithStuff( $data->{ViewPath} );
-
 
1752
 
-
 
1753
        unless ( $data->{ViewPath} eq $testDir  )
1917
        unless ( -d $data->{ViewPath} )
1754
        {
1918
        {
1755
            Message ("Adjust Base Dir: $testDir");
1919
            Message ("Correct UTF-8 change to ViewPath");
1756
            $data->{adjustedPath} = $data->{ViewPath};
1920
            $data->{ViewPath} = encode('UTF-8', $data->{ViewPath}, Encode::FB_DEFAULT);
1757
            $data->{ViewPath} = $testDir;
1921
            Warning ("Correct UTF-8 change to ViewPath - FAILED") unless ( -d $data->{ViewPath} );
1758
        }
1922
        }
1759
    }
1923
    }
1760
    
1924
    
1761
 
-
 
1762
    #
1925
    #
1763
    #   Have a CC view
1926
    #   Have a CC view
1764
    #   Now we can create the SVN package and branching point before we
1927
    #   Now we can create the SVN package and branching point before we
1765
    #   import the CC data into SVN
1928
    #   import the CC data into SVN
1766
    #
1929
    #
Line 2184... Line 2347...
2184
#
2347
#
2185
# Returns         : 
2348
# Returns         : 
2186
#
2349
#
2187
sub endPackage
2350
sub endPackage
2188
{
2351
{
-
 
2352
    Message ("-- Import Summary ------------------------------------------------" );
2189
    RmDirTree ('SvnImportDir');
2353
    RmDirTree ('SvnImportDir');
2190
 
2354
 
2191
    #
2355
    #
2192
    #   Display versions that did get captured
2356
    #   Display versions that did get captured
2193
    #
2357
    #
Line 2203... Line 2367...
2203
    #
2367
    #
2204
    foreach my $entry ( @processOrder )
2368
    foreach my $entry ( @processOrder )
2205
    {
2369
    {
2206
        $versions{$entry}{Scanned} = 1;
2370
        $versions{$entry}{Scanned} = 1;
2207
        next if ( $versions{$entry}{TagCreated} );
2371
        next if ( $versions{$entry}{TagCreated} );
-
 
2372
        my $reason = $versions{$entry}{data}{errStr} || '';
-
 
2373
        my $tag = $versions{$entry}{vcsTag}|| 'No Tag';
2208
        Warning ("Not Processed: " . GetVname($entry) );
2374
        Warning ("Not Processed: " . GetVname($entry) . ':' . $tag . ' : ' . $reason );
2209
    }
2375
    }
2210
 
2376
 
2211
    foreach my $entry ( keys(%versions) )
2377
    foreach my $entry ( keys(%versions) )
2212
    {
2378
    {
2213
        next if ( $versions{$entry}{Scanned} );
2379
        next if ( $versions{$entry}{Scanned} );
2214
        Warning ("(E) INTERNAL ERROR. Package Not Processed: " . GetVname($entry) );
2380
        Warning ("(E) INTERNAL ERROR. Package Not Processed: " . GetVname($entry) );
2215
    }
2381
    }
2216
 
2382
 
-
 
2383
    Message ("Packages Relabled: $packageReLabelCount") if ( $packageReLabelCount );
2217
    Message ("All Done");
2384
    Message ("All Done");
2218
}
2385
}
2219
 
2386
 
2220
#-------------------------------------------------------------------------------
2387
#-------------------------------------------------------------------------------
-
 
2388
# Function        : extractFilesFromClearCase
-
 
2389
#
-
 
2390
# Description     : Extract files from ClearCase
-
 
2391
#                   May take a while as we handle nasty errors
-
 
2392
#
-
 
2393
# Inputs          : $data           - Hash of good stuff from newPackageVersionBody
-
 
2394
#                   $cc_path
-
 
2395
#                   $cc_label
-
 
2396
#
-
 
2397
# Returns         : exit code
-
 
2398
#                   Sets up
-
 
2399
#                       $data->{errStr}
-
 
2400
#                       $data->{errCode}
-
 
2401
#                   As per newPackageVersionBody
-
 
2402
#
-
 
2403
sub extractFilesFromClearCase
-
 
2404
{
-
 
2405
    my ($data, $cc_path, $cc_label) = @_;
-
 
2406
    my $tryCount = 0;
-
 
2407
    my $rv = 99;
-
 
2408
 
-
 
2409
    $data->{ViewRoot} = $opt_name ? $opt_name : "$cc_label";
-
 
2410
    $data->{ViewPath} =  $data->{ViewRoot} . $cc_path;
-
 
2411
    
-
 
2412
    if ( $opt_preserveProjectBase )
-
 
2413
    {
-
 
2414
        my $cc_vob = $cc_path;
-
 
2415
        $cc_vob =~ s~^/~~;
-
 
2416
        $cc_vob =~ s~/.*~~;
-
 
2417
        $data->{ViewPath} =  $data->{ViewRoot} . '/' . $cc_vob;
-
 
2418
        Message ("Preserving Project Base");
-
 
2419
    }
-
 
2420
    $data->{ViewPath} =~  tr~/~/~s;
-
 
2421
 
-
 
2422
    if ( $opt_reuse && -d $data->{ViewPath}  )
-
 
2423
    {
-
 
2424
        Message ("Reusing view: $cc_label");
-
 
2425
        return 0;
-
 
2426
    }
-
 
2427
 
-
 
2428
    while ( $rv == 99 ) {
-
 
2429
        my @args;
-
 
2430
        push (@args, '-view', $opt_name ) if ( defined $opt_name );
-
 
2431
        $rv = JatsToolPrint ( 'jats_ccrelease', '-extractfiles', '-root=.' , '-noprefix',
-
 
2432
                    "-label=$cc_label" ,
-
 
2433
                    "-path=$cc_path",
-
 
2434
                    @args
-
 
2435
                    );
-
 
2436
 
-
 
2437
        if ( $rv == 10 ) {
-
 
2438
 
-
 
2439
            #
-
 
2440
            #   No files found
-
 
2441
            #   If this is the first time then try really hard to find them
-
 
2442
            #
-
 
2443
            unless ( $tryCount++ )
-
 
2444
            {
-
 
2445
                if ( $opt_relabel )
-
 
2446
                {
-
 
2447
                    $packageReLabelCount++;
-
 
2448
                    $rv = JatsToolPrint('cc2svn_labeldirs',
-
 
2449
                                            '-vob', $cc_path,
-
 
2450
                                            $cc_label,
-
 
2451
                                            );
-
 
2452
                    $data->{DirsLabled} = 100 + $rv;
-
 
2453
                }
-
 
2454
 
-
 
2455
                #
-
 
2456
                #   Second attempt - massage the users path
-
 
2457
                #   We should have labled up to the VOB root so lets
-
 
2458
                #   just use the VOB and not the path
-
 
2459
                #
-
 
2460
                #   If we are not relabeling then we can still do this
-
 
2461
                #   in an attempt to fix user stupidity
-
 
2462
                #
-
 
2463
                $cc_path =~ s~^/~~;
-
 
2464
                $cc_path =~ s~/.*~~;
-
 
2465
                $cc_path = '/' . $cc_path;
-
 
2466
                $data->{ViewPath} =  $data->{ViewRoot} . $cc_path;
-
 
2467
                redo;
-
 
2468
            }
-
 
2469
 
-
 
2470
            $data->{errStr}  = 'No Files in the extracted view';
-
 
2471
            $data->{errCode} = '0';
-
 
2472
            return 2;
-
 
2473
        }
-
 
2474
        elsif ( $rv == 11 ) {
-
 
2475
            $data->{errStr} = 'Label not found';
-
 
2476
            $data->{errCode} = 'L';
-
 
2477
            return 2;
-
 
2478
        }
-
 
2479
 
-
 
2480
        unless ( -d $data->{ViewPath}  )
-
 
2481
        {
-
 
2482
            $data->{errStr} = 'Failed to extract files from CC';
-
 
2483
            return 2;
-
 
2484
        }
-
 
2485
 
-
 
2486
        #
-
 
2487
        #   Looks good
-
 
2488
        #
-
 
2489
        return 0;
-
 
2490
    };
-
 
2491
 
-
 
2492
    $data->{errStr}  = 'No Files in the extracted view after labeling dirs';
-
 
2493
    $data->{errCode} = '0';
-
 
2494
    return 2;
-
 
2495
 
-
 
2496
}
-
 
2497
 
-
 
2498
#-------------------------------------------------------------------------------
-
 
2499
# Function        : detectMakeProjectUsage
-
 
2500
#
-
 
2501
# Description     : etect and report usage of the MakeProject directive
-
 
2502
#
-
 
2503
# Inputs          : $data               - Ref to a hash of bits
-
 
2504
#                   $cc_path            - Packages cc_path
-
 
2505
#
-
 
2506
# Returns         : true    - Bad usage (Really good usage not detected)
-
 
2507
#                   false   - Good usage detected
-
 
2508
#
-
 
2509
sub detectMakeProjectUsage
-
 
2510
{
-
 
2511
    my ($data, $cc_path) = @_;
-
 
2512
    my $retval = 0;
-
 
2513
    my $eSuf = $opt_ignoreMakeProjectErrors ? '' : 'Error';
-
 
2514
 
-
 
2515
    #
-
 
2516
    #   Find makefile.pl
-
 
2517
    #
-
 
2518
    Message ("Locate JATS makefiles");
-
 
2519
    my $usesMakeProject = 0;
-
 
2520
    my $badIncludeFile = 0;
-
 
2521
 
-
 
2522
    my $search = JatsLocateFiles->new("--Recurse=1",
-
 
2523
                                       "--FilterIn=makefile.pl",
-
 
2524
                                       );
-
 
2525
    my @makefiles = $search->search($data->{ViewRoot});
-
 
2526
    foreach my $file ( @makefiles )
-
 
2527
    {
-
 
2528
#print "---Reading: $workDir/$data->{ViewRoot}/$file\n";
-
 
2529
        if ( open( my $fh, '<', "$data->{ViewRoot}/$file" ) )
-
 
2530
        {
-
 
2531
            my $eof = 0;
-
 
2532
            my $line = '';
-
 
2533
            until ( $eof )
-
 
2534
            {
-
 
2535
                my $in = <$fh>;
-
 
2536
                unless ( defined $in )
-
 
2537
                {
-
 
2538
                    $eof = 1;
-
 
2539
                }
-
 
2540
                else
-
 
2541
                {
-
 
2542
                $in =~ s~\s+$~~;
-
 
2543
                $in =~ s~^\s+~~;
-
 
2544
                $in =~ s~^#.*$~~;
-
 
2545
                $in =~ s~\s*[^\$]#.*$~~;
-
 
2546
                $line .= ' ' if ( $line );
-
 
2547
                $line .= $in;
-
 
2548
                $line =~ s~\s+~ ~g;
-
 
2549
#print "====== '$line'\n";
-
 
2550
                redo unless ( $line =~ m~;$~  );
-
 
2551
                }
-
 
2552
#print "---- $line\n";
-
 
2553
                if ( $line =~ m~^MakeProject~ )
-
 
2554
                {
-
 
2555
                    $usesMakeProject++;
-
 
2556
                    $data->{UsesMakeProject}++;
-
 
2557
                    Warning ("Package uses MakeProject:",
-
 
2558
                             "Line: " . $line,
-
 
2559
                             "Root: " . "$data->{ViewRoot}",
-
 
2560
                             "File: " . "$data->{ViewRoot}/$file",
-
 
2561
                            );
-
 
2562
 
-
 
2563
                    #
-
 
2564
                    #   Extract out the project name
-
 
2565
                    #
-
 
2566
                    my @myArgs;
-
 
2567
                    my $myProjectDir;
-
 
2568
                    my $myProject = "$data->{ViewRoot}/$file";
-
 
2569
                    $myProject =~ s~/[^/]+$~~;
-
 
2570
                    $line =~ s~MakeProject~push \@myArgs,~;
-
 
2571
                    eval $line;
-
 
2572
                    Error("Line did not compiler: $line", "Err: $@" ) if ($@);
-
 
2573
                    shift @myArgs;
-
 
2574
                    foreach ( @myArgs )
-
 
2575
                    {
-
 
2576
                        next if ( m~^--~ );
-
 
2577
                        $myProject .= '/' . $_;
-
 
2578
                        $myProjectDir = $myProject;
-
 
2579
                        $myProjectDir =~ s~/[^/]+$~~;
-
 
2580
                        last;
-
 
2581
                    }
-
 
2582
                    Error ("No project Found") unless ( defined $myProjectDir);
-
 
2583
                    if ( -f "$myProjectDir/include.txt" )
-
 
2584
                    {
-
 
2585
                        Warning ("Co-located 'include.txt' file also found");
-
 
2586
                    }
-
 
2587
 
-
 
2588
                    # The only problem is if the include.txt file
-
 
2589
                    # escapes from the VOB - or even uses the vob root
-
 
2590
                    #
-
 
2591
                    # Examine the include file
-
 
2592
                    # Expect it to look like
-
 
2593
                    #   /I Path
-
 
2594
                    #
-
 
2595
 
-
 
2596
                    #
-
 
2597
                    #   Determine safe level
-
 
2598
                    #   Relative to the include file
-
 
2599
                    #
-
 
2600
                    my $depthPath = $myProjectDir;
-
 
2601
                    my $depth = 0;
-
 
2602
                    Error ("Expect this to work") unless ( $depthPath =~ s~^$data->{ViewRoot}/~~ );
-
 
2603
                    foreach ( split('/', $depthPath) )
-
 
2604
                    {
-
 
2605
                        if ( $_ eq '..' ) {
-
 
2606
                            $depth--;
-
 
2607
                        } else {
-
 
2608
                            $depth++;
-
 
2609
                        }
-
 
2610
                    }
-
 
2611
#print "Depth: $depth, $depthPath\n";
-
 
2612
 
-
 
2613
                    if ( open( my $if, '<', "$myProjectDir/include.txt" ) )
-
 
2614
                    {
-
 
2615
                        while ( <$if> )
-
 
2616
                        {
-
 
2617
                            s~\s+$~~;
-
 
2618
                            s~^\s+~~;
-
 
2619
                            next unless ( $_ );
-
 
2620
                            if ( m~/I\s+(.*)~ )
-
 
2621
                            {
-
 
2622
                                my $path = $1;
-
 
2623
                                $path =~ tr~\\/~/~s;
-
 
2624
                                $path =~ s~\\~/~g;
-
 
2625
#print "Examine: $path\n";
-
 
2626
                                my $minLevel = 0;
-
 
2627
                                my $level = 0;
-
 
2628
                                foreach ( split('/', $path) )
-
 
2629
                                {
-
 
2630
                                    if ( $_ eq '..' )
-
 
2631
                                    {
-
 
2632
                                        $level--;
-
 
2633
                                        $minLevel = $level if ($level < $minLevel);
-
 
2634
                                    }
-
 
2635
                                    else
-
 
2636
                                    {
-
 
2637
                                        $level++;
-
 
2638
                                    }
-
 
2639
                                }
-
 
2640
#print "Min: $minLevel, $level, ($depth + $minLevel)\n";
-
 
2641
                                if ( $depth + $minLevel <= 0)
-
 
2642
                                {
-
 
2643
                                    $badIncludeFile++;
-
 
2644
                                    Warning ("Included path escapes package:",
-
 
2645
                                             "Line: " . $_,
-
 
2646
                                             "File: " . "$myProjectDir/include.txt",
-
 
2647
                                            );
-
 
2648
                                    last;
-
 
2649
                                }
-
 
2650
                            }
-
 
2651
                        }
-
 
2652
                        close $if;
-
 
2653
                    }
-
 
2654
 
-
 
2655
                }
-
 
2656
                $line = '';
-
 
2657
            }
-
 
2658
            close $fh;
-
 
2659
        }
-
 
2660
        else
-
 
2661
        {
-
 
2662
            Warning ("MakeProject$eSuf - Cannot open makefile: $file");
-
 
2663
            $retval = 1;
-
 
2664
        }
-
 
2665
    }
-
 
2666
 
-
 
2667
    #
-
 
2668
    #   Used
-
 
2669
    #   May be improved latter
-
 
2670
    #
-
 
2671
    if ( $usesMakeProject && $badIncludeFile)
-
 
2672
    {
-
 
2673
        Warning ("MakeProject$eSuf - Problem detected");
-
 
2674
        $retval = 1;
-
 
2675
    }
-
 
2676
 
-
 
2677
    #
-
 
2678
    #   Until we have more faith in the detection algorithm
-
 
2679
    #
-
 
2680
    if ( $usesMakeProject )
-
 
2681
    {
-
 
2682
        Warning ("MakeProject$eSuf - Makeproject used. Must check manually");
-
 
2683
        $retval = 1;
-
 
2684
    }
-
 
2685
    
-
 
2686
    return $retval;
-
 
2687
}
-
 
2688
 
-
 
2689
#-------------------------------------------------------------------------------
2221
# Function        : detectProjectBaseUsage
2690
# Function        : detectProjectBaseUsage
2222
#
2691
#
2223
# Description     : Detect and report usage of the SetProjectBase directive
2692
# Description     : Detect and report usage of the SetProjectBase directive
2224
#
2693
#
2225
# Inputs          : $data               - Ref to a hash of bits
2694
# Inputs          : $data               - Ref to a hash of bits
Line 2265... Line 2734...
2265
 
2734
 
2266
                if ( m~^SetProjectBase~ )
2735
                if ( m~^SetProjectBase~ )
2267
                {
2736
                {
2268
                    $definesProjectBase++;
2737
                    $definesProjectBase++;
2269
                    $data->{DefinesProjectBase}++;
2738
                    $data->{DefinesProjectBase}++;
2270
                    Warning ("Package uses SetProjectBase:",
2739
                    Warning ("Package initialises SetProjectBase:",
2271
                             "Line: " . $_,
2740
                             "Line: " . $_,
2272
                             "Root: " . "$data->{ViewRoot}",
2741
                             "Root: " . "$data->{ViewRoot}",
2273
                             "File: " . "$data->{ViewRoot}/$file",
2742
                             "File: " . "$data->{ViewRoot}/$file",
2274
                            );
2743
                            );
2275
 
2744
 
Line 2297... Line 2766...
2297
                        pop @bpaths;
2766
                        pop @bpaths;
2298
                    }
2767
                    }
2299
                    unless (defined $blevel)
2768
                    unless (defined $blevel)
2300
                    {
2769
                    {
2301
                        Warning ("SetProjectBase$eSuf calculation failed - can't find build.pl");
2770
                        Warning ("SetProjectBase$eSuf calculation failed - can't find build.pl");
2302
                        $retval = 1;
2771
#                        $retval = 1;
-
 
2772
                         $definitionError++;
2303
                    }
2773
                    }
2304
                    else
2774
                    else
2305
                    {
2775
                    {
2306
                        #
2776
                        #
2307
                        #   Determine the depth of the view root
2777
                        #   Determine the depth of the view root
Line 2373... Line 2843...
2373
 
2843
 
2374
#-------------------------------------------------------------------------------
2844
#-------------------------------------------------------------------------------
2375
# Function        : findDirWithStuff
2845
# Function        : findDirWithStuff
2376
#
2846
#
2377
# Description     : Find a directory that contains more than just another subdir
2847
# Description     : Find a directory that contains more than just another subdir
-
 
2848
#                   Note: don't use 'glob' it doesn't work if the name has a space in it.
2378
#
2849
#
2379
# Inputs          : $base               - Start of the scan
2850
# Inputs          : $base               - Start of the scan
2380
#
2851
#
2381
# Returns         : Path to dir with more than just a single dir in it
2852
# Returns         : Path to dir with more than just a single dir in it
2382
#
2853
#
Line 2388... Line 2859...
2388
    {
2859
    {
2389
    my $fileCount = 0;
2860
    my $fileCount = 0;
2390
    my $dirCount = 0;
2861
    my $dirCount = 0;
2391
    my $firstDir;
2862
    my $firstDir;
2392
 
2863
 
-
 
2864
    opendir (my $dh, $base ) || Error ("Cannot opendir $base. $!");
2393
    my @list = glob( $base . '/*');
2865
    my @list =readdir $dh;
-
 
2866
    closedir $dh;
2394
    foreach ( @list )
2867
    foreach ( @list )
2395
    {
2868
    {
2396
        next if ( $_ eq '.' );
2869
        next if ( $_ eq '.' );
2397
        next if ( $_ eq '..' );
2870
        next if ( $_ eq '..' );
-
 
2871
 
-
 
2872
        $_ = $base . '/' . $_;
2398
        if ( -d $_ )
2873
        if ( -d $_ )
2399
        {
2874
        {
2400
            $dirCount++;
2875
            $dirCount++;
2401
            $firstDir = $_ unless ( defined $firstDir );
2876
            $firstDir = $_ unless ( defined $firstDir );
-
 
2877
            return $base
2402
            return $base if ( $dirCount > 1  );
2878
                if ( $dirCount > 1  )
2403
        }
2879
        }
2404
        elsif ( -e $_ )
2880
        elsif ( -e $_ )
2405
        {
2881
        {
2406
            return $base;
2882
            return $base;
2407
        }
2883
        }
2408
 
2884
 
2409
        # else its probably a dead symlink
2885
        # else its probably a dead symlink
2410
    }
2886
    }
-
 
2887
 
-
 
2888
    return $base
2411
    return $base unless ( $dirCount == 1  );
2889
        unless ( $dirCount == 1  );
2412
    $base = $firstDir;
2890
    $base = $firstDir;
2413
    }
2891
    }
2414
}
2892
}
2415
 
2893
 
2416
 
-
 
2417
#-------------------------------------------------------------------------------
2894
#-------------------------------------------------------------------------------
2418
# Function        : JatsToolPrint
2895
# Function        : JatsToolPrint
2419
#
2896
#
2420
# Description     : Print and Execuate a JatsTool command
2897
# Description     : Print and Execuate a JatsTool command
2421
#
2898
#
Line 2443... Line 2920...
2443
        }
2920
        }
2444
    }
2921
    }
2445
    return $me;
2922
    return $me;
2446
}
2923
}
2447
 
2924
 
-
 
2925
#-------------------------------------------------------------------------------
-
 
2926
# Function        : saneLabel
-
 
2927
#
-
 
2928
# Description     : Generate a sane version label
-
 
2929
#                   Handle suplicates (due to character squishing)
-
 
2930
#                   Cache results for repeatability
-
 
2931
#
-
 
2932
# Inputs          : $entry          - Version info
-
 
2933
#                   $pkgname        - Alternate pkgname (branching)
-
 
2934
#
-
 
2935
# Returns         : Sane string
-
 
2936
#
2448
sub saneLabel
2937
sub saneLabel
2449
{
2938
{
2450
    my ($entry, $pkgname) = @_;
2939
    my ($entry, $pkgname) = @_;
2451
    my $me;
2940
    my $me;
2452
    $me = $versions{$entry}{vname};
2941
    $me = $versions{$entry}{vname};
2453
    $pkgname = $versions{$entry}{name} unless ( defined $pkgname );
2942
    $pkgname = $versions{$entry}{name} unless ( defined $pkgname );
2454
 
2943
 
-
 
2944
    #
-
 
2945
    #   If we have calculated it, then reuse it.
-
 
2946
    #
-
 
2947
    if ( exists $versions{$entry}{saneLabel}{$pkgname} )
-
 
2948
    {
-
 
2949
        return $versions{$entry}{saneLabel}{$pkgname};
-
 
2950
    }
-
 
2951
 
-
 
2952
 
2455
    Error ("Package does have a version string: pvid: $entry")
2953
    Error ("Package does have a version string: pvid: $entry")
2456
        unless ( defined $me );
2954
        unless ( defined $me );
2457
 
2955
 
2458
    #
2956
    #
2459
    #   Convert Wip format (xxxx) into a string that can be used for a label
2957
    #   Convert Wip format (xxxx) into a string that can be used for a label
Line 2473... Line 2971...
2473
    $me = $pkgname . '_' . $me;
2971
    $me = $pkgname . '_' . $me;
2474
    $me =~ tr~ ~-~s;
2972
    $me =~ tr~ ~-~s;
2475
    $me =~ tr~-~-~s;
2973
    $me =~ tr~-~-~s;
2476
    $me =~ tr~_~_~s;
2974
    $me =~ tr~_~_~s;
2477
 
2975
 
-
 
2976
    #
-
 
2977
    #   Due to some sillyness ( package version starting with _ )
-
 
2978
    #   we may get duplicates. Detect and allocate different numbers
-
 
2979
    #
-
 
2980
    if ( exists $saneLabels{$me} )
-
 
2981
    {
-
 
2982
        $saneLabels{$me}++;
-
 
2983
        $me = $me . '.' . $saneLabels{$me};
-
 
2984
        Message ("Duplicate SaneLabel resolved as: $me");
-
 
2985
    }
-
 
2986
    else
-
 
2987
    {
-
 
2988
        $saneLabels{$me} = 0;
-
 
2989
    }
-
 
2990
 
-
 
2991
    #
-
 
2992
    #   Cache value
-
 
2993
    #
-
 
2994
    $versions{$entry}{saneLabel}{$pkgname} = $me;
2478
    return $me;
2995
    return $me;
2479
}
2996
}
2480
 
2997
 
2481
sub saneString
2998
sub saneString
2482
{
2999
{
Line 2579... Line 3096...
2579
    connectRM(\$RM_DB) unless ( $RM_DB );
3096
    connectRM(\$RM_DB) unless ( $RM_DB );
2580
 
3097
 
2581
    #
3098
    #
2582
    #   Extract data from Release Manager
3099
    #   Extract data from Release Manager
2583
    #
3100
    #
-
 
3101
    my $m_sqlstr = "SELECT " .
-
 
3102
                       "pkg.PKG_NAME, " .                                       # row[0]
-
 
3103
                       "pv.PKG_VERSION, " .                                     # row[1]
-
 
3104
                       "pkg.PKG_ID, " .                                         # row[2]
-
 
3105
                       "pv.PV_ID, " .                                           # row[3]
-
 
3106
                       "pv.LAST_PV_ID, " .                                      # row[4]
-
 
3107
                       "pv.MODIFIED_STAMP, " .                                  # row[5]
2584
    my $m_sqlstr = "SELECT pkg.PKG_NAME, pv.PKG_VERSION, pkg.PKG_ID, pv.PV_ID, pv.LAST_PV_ID, pv.MODIFIED_STAMP, release_manager.PK_RMAPI.return_vcs_tag(pv.PV_ID), amu.USER_NAME, pv.COMMENTS, pv.DLOCKED, pv.CREATOR_ID ".
3108
                       "release_manager.PK_RMAPI.return_vcs_tag(pv.PV_ID), " .  # row[6]
2585
                   " FROM RELEASE_MANAGER.PACKAGES pkg, RELEASE_MANAGER.PACKAGE_VERSIONS pv, ACCESS_MANAGER.USERS amu" .
3109
                       "amu.USER_NAME, " .                                      # row[7]
-
 
3110
                       "pv.COMMENTS, " .                                        # row[8]
-
 
3111
                       "pv.DLOCKED, " .                                         # row[9]
-
 
3112
                       "pv.CREATOR_ID, ".                                       # row[10]
2586
                   " WHERE pv.PKG_ID = \'$pkg_id\' AND pkg.PKG_ID = pv.PKG_ID AND amu.USER_ID (+) = pv.CREATOR_ID";
3113
                       "pv.BUILD_TYPE ".                                        # row[11]
2587
                   
3114
                   " FROM " .
-
 
3115
                        "RELEASE_MANAGER.PACKAGES pkg, " .
-
 
3116
                        "RELEASE_MANAGER.PACKAGE_VERSIONS pv, " .
-
 
3117
                        "ACCESS_MANAGER.USERS amu" .
2588
                   
3118
                   " WHERE " .
-
 
3119
                        "pv.PKG_ID = \'$pkg_id\' " .
-
 
3120
                        "AND pkg.PKG_ID = pv.PKG_ID " .
-
 
3121
                        "AND amu.USER_ID (+) = pv.CREATOR_ID";
-
 
3122
 
2589
    my $sth = $RM_DB->prepare($m_sqlstr);
3123
    my $sth = $RM_DB->prepare($m_sqlstr);
2590
    if ( defined($sth) )
3124
    if ( defined($sth) )
2591
    {
3125
    {
2592
        if ( $sth->execute( ) )
3126
        if ( $sth->execute( ) )
2593
        {
3127
        {
Line 2606... Line 3140...
2606
                    my $vcstag =  $row[6] || 'Unknown';
3140
                    my $vcstag =  $row[6] || 'Unknown';
2607
 
3141
 
2608
                    my $created_id =  $row[7] || ($row[10] ? "Userid_$row[10]" :'Unknown');
3142
                    my $created_id =  $row[7] || ($row[10] ? "Userid_$row[10]" :'Unknown');
2609
                    my $comment =  $row[8] || '';
3143
                    my $comment =  $row[8] || '';
2610
                    my $locked =  $row[9] || 'N';
3144
                    my $locked =  $row[9] || 'N';
-
 
3145
                    my $manual = $row[11] || 'M';
2611
 
3146
 
2612
                    #
3147
                    #
2613
                    #   Some developers have a 'special' package version
3148
                    #   Some developers have a 'special' package version
2614
                    #   We really need to ignore them
3149
                    #   We really need to ignore them
2615
                    #
3150
                    #
Line 2629... Line 3164...
2629
                    $versions{$pv_id}{comment} = $comment;
3164
                    $versions{$pv_id}{comment} = $comment;
2630
                    $versions{$pv_id}{locked} = $locked;
3165
                    $versions{$pv_id}{locked} = $locked;
2631
                    $versions{$pv_id}{TimeStamp} = str2time( $created );
3166
                    $versions{$pv_id}{TimeStamp} = str2time( $created );
2632
                    $versions{$pv_id}{Age} = ($now - $versions{$pv_id}{TimeStamp}) / (60 * 60 * 24);
3167
                    $versions{$pv_id}{Age} = ($now - $versions{$pv_id}{TimeStamp}) / (60 * 60 * 24);
2633
                    $versions{$pv_id}{TooOld} = 1 if ( $opt_age && $opt_age <= $versions{$pv_id}{Age} );
3168
                    $versions{$pv_id}{TooOld} = 1 if ( $opt_age && $opt_age <= $versions{$pv_id}{Age} );
-
 
3169
                    $versions{$pv_id}{BuildType} = $manual;
2634
                    examineVcsTag($pv_id);
3170
                    examineVcsTag($pv_id);
2635
 
3171
 
2636
                    #
3172
                    #
2637
                    #   Process version number
3173
                    #   Process version number
2638
                    #
3174
                    #
2639
                    my ($suffix, $version, $isaR, $isaWip, $buildVersion ) = massageVersion($pkg_ver, $pkg_name);
3175
                    my ($suffix, $version, $isaR, $isaWip, $buildVersion ) = massageVersion($pkg_ver, $pkg_name);
2640
 
3176
 
2641
                    $versions{$pv_id}{version} = $version;
3177
                    $versions{$pv_id}{version} = $version;
2642
                    $versions{$pv_id}{buildVersion} = $buildVersion;
3178
                    $versions{$pv_id}{buildVersion} = $buildVersion;
2643
                    $versions{$pv_id}{isaRipple} = 1 if ( $isaR );
-
 
2644
                    $versions{$pv_id}{isaWip} = 1 if ( $isaWip );
3179
                    $versions{$pv_id}{isaWip} = 1 if ( $isaWip );
2645
 
3180
 
2646
                    #
3181
                    #
-
 
3182
                    #   New methof for detecting a ripple
-
 
3183
                    #       Don't look at the version number
-
 
3184
                    #       Use RM data
-
 
3185
                    #       Inlude the comment - there are some cases where the comment
-
 
3186
                    #       appears to have been user modified.
-
 
3187
                    #
-
 
3188
#                    $versions{$pv_id}{isaRipple} = 1 if ( $isaR );
-
 
3189
#                    $versions{$pv_id}{isaRipple} = 1 if ( uc($manual) eq 'Y' );
-
 
3190
                    $versions{$pv_id}{isaRipple} = ( $comment =~ m~^Rippled Build~i && ( uc($manual) eq 'Y' ));
-
 
3191
 
-
 
3192
                    #
2647
                    #   Process suffix
3193
                    #   Process suffix
2648
                    #
3194
                    #
2649
                    $suffix = 'Unknown' unless ( $suffix );
3195
                    $suffix = 'Unknown' unless ( $suffix );
2650
                    $suffix = lc ($suffix);
3196
                    $suffix = lc ($suffix);
2651
                    $versions{$pv_id}{suffix} = $suffix;
3197
                    $versions{$pv_id}{suffix} = $suffix;
Line 2905... Line 3451...
2905
{
3451
{
2906
    my ($tag) = @_;
3452
    my ($tag) = @_;
2907
    $tag =~ tr~\\/~/~;
3453
    $tag =~ tr~\\/~/~;
2908
    if ( $tag =~ m~^CC::~ )
3454
    if ( $tag =~ m~^CC::~ )
2909
    {
3455
    {
-
 
3456
        $tag =~ s~CC::load\s+~CC::~;                # Load rule
-
 
3457
        $tag =~ s~CC::\s+~CC::~;                    # Leading white space
-
 
3458
        $tag =~ s~CC::[A-Za-z]\:/~CC::/~;           # Leading driver letter
-
 
3459
        $tag =~ s~CC::/+~CC::/~;                    # Multiple initial /'s
-
 
3460
        $tag =~ s~/build.pl::~::~i;
2910
        $tag =~ s~CC::\s+~CC::~;
3461
        $tag =~ s~/src::~::~i;
2911
        $tag =~ s~MASS_Dev_Bus/Cbp/~MASS_Dev_Bus/CBP/~i;
3462
        $tag =~ s~MASS_Dev_Bus/Cbp/~MASS_Dev_Bus/CBP/~i;
2912
        $tag =~ s~MASS_Dev_Bus~MASS_Dev_Bus~i;
3463
        $tag =~ s~MASS_Dev_Bus~MASS_Dev_Bus~i;
2913
        $tag =~ s~/MASS_Dev/Infra~MASS_Dev_Infra~i;
3464
        $tag =~ s~/MASS_Dev/Infra~MASS_Dev_Infra~i;
2914
        $tag =~ s~/MASS_Dev/Bus/web~/MASS_Dev_Bus/web~i;
3465
        $tag =~ s~/MASS_Dev/Bus/web~/MASS_Dev_Bus/web~i;
2915
 
3466
 
Line 3084... Line 3635...
3084
            push @text, '|';
3635
            push @text, '|';
3085
            push @text, 'Subversion';
3636
            push @text, 'Subversion';
3086
            push @text, 'Trunk used' if exists $svnData{branches}{trunk} ;
3637
            push @text, 'Trunk used' if exists $svnData{branches}{trunk} ;
3087
            push @text, 'Labels: ' . scalar keys %{$svnData{tags}} ;
3638
            push @text, 'Labels: ' . scalar keys %{$svnData{tags}} ;
3088
            push @text, 'Branches: ' . scalar keys %{$svnData{branches}} ;
3639
            push @text, 'Branches: ' . scalar keys %{$svnData{branches}} ;
-
 
3640
            push @text, 'Relabled Packages : ' . $packageReLabelCount;
3089
        }
3641
        }
3090
 
3642
 
3091
        push @text, '';
3643
        push @text, '';
3092
        my $text = join '\l', @text;
3644
        my $text = join '\l', @text;
3093
        $text =~ s~\|\\l~|~g;
3645
        $text =~ s~\|\\l~|~g;
Line 3120... Line 3672...
3120
        push @text, '|{N: Not Locked';
3672
        push @text, '|{N: Not Locked';
3121
        push @text, 'b: Bad Singleton';
3673
        push @text, 'b: Bad Singleton';
3122
        push @text, 'B: Bad VCS Tag';
3674
        push @text, 'B: Bad VCS Tag';
3123
        push @text, 'D: DeadWood';
3675
        push @text, 'D: DeadWood';
3124
        push @text, 'E: Essential Release Version';
3676
        push @text, 'E: Essential Release Version';
-
 
3677
        push @text, 'F: Package directories labled';
3125
        push @text, 'G: Glued into Version Tree';
3678
        push @text, 'G: Glued into Version Tree';
-
 
3679
        push @text, 'L: Label not in VOB';
3126
        push @text, 'r: Recent version';
3680
        push @text, 'r: Recent version';
3127
        push @text, 'R: Ripple';
3681
        push @text, 'R: Ripple';
3128
        push @text, 'S: Splitpoint';
3682
        push @text, 'S: Splitpoint';
3129
        push @text, 't: Glued into Project Tree';
3683
        push @text, 't: Glued into Project Tree';
3130
        push @text, 'T: Tip version';
3684
        push @text, 'T: Tip version';
3131
        push @text, 'V: In SVN';
3685
        push @text, 'V: In SVN';
3132
        push @text, '+: In Subversion';
3686
        push @text, '+: In Subversion';
-
 
3687
        push @text, '0: Zero files extracted';
3133
        push @text, '}}';
3688
        push @text, '}}';
3134
 
3689
 
3135
        push @text, '|';
3690
        push @text, '|';
3136
        push @text, 'Outline';
3691
        push @text, 'Outline';
3137
        push @text, 'Red: Dead or Bad VCS Tag';
3692
        push @text, 'Red: Dead or Bad VCS Tag';
3138
        push @text, 'Orange: Project Branch Root';
3693
        push @text, 'Orange: Project Branch Root';
3139
        push @text, 'Green: Ripple Build Version';
3694
        push @text, 'Green: Ripple Build Version';
3140
        push @text, 'Blue: Essential Version';
3695
        push @text, 'Blue: Essential Version';
3141
        push @text, 'Darkmagenta: Entry Glued into tree';
3696
        push @text, 'Darkmagenta: Entry Glued into tree';
3142
        push @text, 'Magenta: Entry added to project tree';
3697
        push @text, 'Magenta: Entry added to project tree';
-
 
3698
        push @text, 'DeepPink: Label not in VOB';
-
 
3699
        push @text, 'DarkViolet: Zero files extracted';
3143
 
3700
 
3144
 
3701
 
3145
        push @text, '|';
3702
        push @text, '|';
3146
        push @text, 'Fill';
3703
        push @text, 'Fill';
3147
        push @text, 'PowderBlue: Essential Version';
3704
        push @text, 'PowderBlue: Essential Version';
Line 3200... Line 3757...
3200
        $stateText .= 'r' if (exists $versions{$entry}{keepRecent} && $versions{$entry}{keepRecent} );
3757
        $stateText .= 'r' if (exists $versions{$entry}{keepRecent} && $versions{$entry}{keepRecent} );
3201
        $stateText .= 'S' if (exists $versions{$entry}{EssentialSplitPoint} && $versions{$entry}{EssentialSplitPoint} > 1 );
3758
        $stateText .= 'S' if (exists $versions{$entry}{EssentialSplitPoint} && $versions{$entry}{EssentialSplitPoint} > 1 );
3202
        $stateText .= 'T' if (exists $versions{$entry}{Tip} );
3759
        $stateText .= 'T' if (exists $versions{$entry}{Tip} );
3203
        $stateText .= 'V' if (exists $versions{$entry}{isSvn} );
3760
        $stateText .= 'V' if (exists $versions{$entry}{isSvn} );
3204
        $stateText .= '+' if (exists $versions{$entry}{svnVersion} );
3761
        $stateText .= '+' if (exists $versions{$entry}{svnVersion} );
-
 
3762
        $stateText .= '0' if (exists $versions{$entry}{data}{errCode} && $versions{$entry}{data}{errCode} eq '0');
-
 
3763
        $stateText .= 'L' if (exists $versions{$entry}{data}{errCode} && $versions{$entry}{data}{errCode} eq 'L');
-
 
3764
        $stateText .= 'F' if ($versions{$entry}{data}{DirsLabled});
-
 
3765
 
-
 
3766
 
3205
#        $stateText .= 's' if (exists $versions{$entry}{branchPoint} );
3767
#        $stateText .= 's' if (exists $versions{$entry}{branchPoint} );
3206
#        $stateText .= ' T='. $versions{$entry}{threadId} if (exists $versions{$entry}{threadId});
3768
#        $stateText .= ' T='. $versions{$entry}{threadId} if (exists $versions{$entry}{threadId});
3207
#        $stateText .= ' EssentalPath' if (exists $versions{$entry}{EssentialPath});
3769
#        $stateText .= ' EssentalPath' if (exists $versions{$entry}{EssentialPath});
3208
#        $stateText .= ' Count='. $versions{$entry}{EssentialSplitPoint} if (exists $versions{$entry}{EssentialSplitPoint});
3770
#        $stateText .= ' Count='. $versions{$entry}{EssentialSplitPoint} if (exists $versions{$entry}{EssentialSplitPoint});
3209
#        $stateText .= ' M='. $versions{$entry}{maxVersion} if (exists $versions{$entry}{maxVersion});
3771
#        $stateText .= ' M='. $versions{$entry}{maxVersion} if (exists $versions{$entry}{maxVersion});
3210
 
3772
 
3211
        push @label, "(${stateText})" if ( $stateText );
3773
        push @label, "(${stateText})" if ( length($stateText) );
3212
 
3774
 
3213
##       Insert Release Names
3775
##       Insert Release Names
3214
        foreach my $rtag_id ( keys %{$versions{$entry}{Releases}}  ) {
3776
        foreach my $rtag_id ( keys %{$versions{$entry}{Releases}}  ) {
3215
            next unless ( exists $ukHopsReleases{$rtag_id} );
3777
            next unless ( exists $ukHopsReleases{$rtag_id} );
3216
            push @label, "Release: $versions{$entry}{Releases}{$rtag_id}{rname}";
3778
            push @label, "Release: $versions{$entry}{Releases}{$rtag_id}{rname}";
Line 3241... Line 3803...
3241
           $color = 'color=orange style=bold' if ( $versions{$entry}{newSuffix} );
3803
           $color = 'color=orange style=bold' if ( $versions{$entry}{newSuffix} );
3242
           $color = 'color=red style=bold' if ( $versions{$entry}{DeadWood} || $versions{$entry}{badVcsTag} );
3804
           $color = 'color=red style=bold' if ( $versions{$entry}{DeadWood} || $versions{$entry}{badVcsTag} );
3243
           $color = 'color=blue style=bold' if ( $versions{$entry}{Essential} );
3805
           $color = 'color=blue style=bold' if ( $versions{$entry}{Essential} );
3244
           $color = 'color=darkmagenta style=bold' if ( $versions{$entry}{GluedIn} );
3806
           $color = 'color=darkmagenta style=bold' if ( $versions{$entry}{GluedIn} );
3245
           $color = 'color=magenta style=bold' if ( $versions{$entry}{MakeTree} );
3807
           $color = 'color=magenta style=bold' if ( $versions{$entry}{MakeTree} );
-
 
3808
           $color = 'color=DeepPink style=bold' if (exists $versions{$entry}{data}{errCode} && $versions{$entry}{data}{errCode} eq 'L');
-
 
3809
           $color = 'color=DarkViolet style=bold' if (exists $versions{$entry}{data}{errCode} && $versions{$entry}{data}{errCode} eq '0');
3246
 
3810
 
3247
           $fill = 'style=filled fillcolor=powderblue' if ( $versions{$entry}{Essential} );
3811
           $fill = 'style=filled fillcolor=powderblue' if ( $versions{$entry}{Essential} );
3248
           $fill = 'style=filled fillcolor=red' if ( $versions{$entry}{Essential} && $versions{$entry}{badVcsTag} );
3812
           $fill = 'style=filled fillcolor=red' if ( $versions{$entry}{Essential} && $versions{$entry}{badVcsTag} );
3249
           $fill = 'style=filled fillcolor="#99FF99"' if ( exists $versions{$entry}{svnVersion} );
3813
           $fill = 'style=filled fillcolor="#99FF99"' if ( exists $versions{$entry}{svnVersion} );
3250
 
3814
 
Line 3466... Line 4030...
3466
        }
4030
        }
3467
        
4031
        
3468
        #print "ESSENTIAL: $versions{$_}{name} $versions{$_}{vname}\n";
4032
        #print "ESSENTIAL: $versions{$_}{name} $versions{$_}{vname}\n";
3469
    }
4033
    }
3470
 
4034
 
3471
 
-
 
3472
    #
4035
    #
3473
    #   Free memory
4036
    #   Free memory
3474
    #
4037
    #
3475
    %ScmReleases = ();
4038
    %ScmReleases = ();
3476
    %ScmPackages = ();
4039
    %ScmPackages = ();
Line 3778... Line 4341...
3778
    -name=aaa          - Alternate output package name. Test Only
4341
    -name=aaa          - Alternate output package name. Test Only
3779
    -[no]log           - Write output to log file. Def: -nolog
4342
    -[no]log           - Write output to log file. Def: -nolog
3780
    -[no]postimage     - Create image after transger: Def: -post
4343
    -[no]postimage     - Create image after transger: Def: -post
3781
    -workdir=path      - Use for temp storage (def:/work)
4344
    -workdir=path      - Use for temp storage (def:/work)
3782
    -delete            - Delete SVN package before test
4345
    -delete            - Delete SVN package before test
-
 
4346
    -[no]relabel       - Attempt to relabel dirs in packages that don't extract
3783
 
4347
 
3784
=head1 OPTIONS
4348
=head1 OPTIONS
3785
 
4349
 
3786
=over 8
4350
=over 8
3787
 
4351