Subversion Repositories DevTools

Rev

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

Rev 7300 Rev 7323
Line 21... Line 21...
21
use Pod::Usage;
21
use Pod::Usage;
22
use Getopt::Long;
22
use Getopt::Long;
23
 
23
 
24
use JatsError;
24
use JatsError;
25
use JatsSystem;
25
use JatsSystem;
-
 
26
use JatsRmApi;
-
 
27
use DBI;
26
use FileUtils;
28
use FileUtils;
27
use Cwd;
29
use Cwd;
28
 
30
 
29
my $VERSION = "1.0.0";                      # Update this
31
my $VERSION = "1.0.0";                      # Update this
30
 
32
 
Line 32... Line 34...
32
#   Options
34
#   Options
33
#
35
#
34
my $opt_debug   = $ENV{'GBE_DEBUG'};        # Allow global debug
36
my $opt_debug   = $ENV{'GBE_DEBUG'};        # Allow global debug
35
my $opt_verbose = $ENV{'GBE_VERBOSE'};      # Allow global verbose
37
my $opt_verbose = $ENV{'GBE_VERBOSE'};      # Allow global verbose
36
my $opt_help = 0;
38
my $opt_help = 0;
37
my $opt_manual = 0;
-
 
38
my $opt_new_label;
39
my $opt_new_label;
39
my $opt_old_label;
40
my $opt_old_label;
40
my $opt_md5check;
41
my $opt_md5check;
41
my $opt_mode;
42
my $opt_mode;
42
my $opt_diff;
43
my $opt_diff;
-
 
44
my $opt_rtag_id;
-
 
45
my $opt_package_name;
43
my @opt_options;
46
my @opt_options;
-
 
47
my $opt_patch;
44
 
48
 
45
#
49
#
46
#   Globals - Provided by the JATS environment
50
#   Globals - Provided by the JATS environment
47
#
51
#
48
my $USER            = $ENV{'USER'};
52
my $USER            = $ENV{'USER'};
Line 59... Line 63...
59
my $DiffWait;
63
my $DiffWait;
60
my @view_tags;
64
my @view_tags;
61
my @view_commands;
65
my @view_commands;
62
my @cleanFiles;
66
my @cleanFiles;
63
 
67
 
-
 
68
my $RM_DB;                      # Database interface
-
 
69
my $package_name;               # Selected package name.
-
 
70
my $package_ver;                # Selected package version.
-
 
71
my $package_vcs;                # Selected package VCS tag.
-
 
72
my $package_vcs_base;           # Selected package base path.
-
 
73
my $package_release_branch;     # Selected package release branch or nul if released on trunk.
-
 
74
 
64
 
75
 
65
#-------------------------------------------------------------------------------
76
#-------------------------------------------------------------------------------
66
# Function        : Mainline Entry Point
77
# Function        : Mainline Entry Point
67
#
78
#
68
# Description     :
79
# Description     :
Line 72... Line 83...
72
 
83
 
73
#
84
#
74
#   Parse the user options
85
#   Parse the user options
75
#
86
#
76
my $result = GetOptions (
87
my $result = GetOptions (
77
                "help+"         => \$opt_help,              # Help level
88
                'help|h:+'          => \$opt_help,              # Help Level
78
                "manual"        => \$opt_manual,            # Help level
89
                'manual:3'          => \$opt_help,              # Help Level
79
                "verbose:+"     => \$opt_verbose,           # Verbosity
90
                "verbose:+"         => \$opt_verbose,           # Verbosity
80
                "debug:+"       => \$opt_debug,             # Debug Verbosity
91
                "debug:+"           => \$opt_debug,             # Debug Verbosity
81
                "new=s"         => \$opt_new_label,         # Path1
92
                "new=s"             => \$opt_new_label,         # Path1
82
                "old=s"         => \$opt_old_label,         # Path2
93
                "old=s"             => \$opt_old_label,         # Path2
83
                'check'         => \$opt_md5check,          # Force MD5 Check
94
                'check'             => \$opt_md5check,          # Force MD5 Check
84
                'diff!'         => \$opt_diff,              # Force use of diff
95
                'diff!'             => \$opt_diff,              # Force use of diff
-
 
96
                "rtagid|rtag_id=s"  => \$opt_rtag_id,           # Release tag needed for release extractions
-
 
97
                "package=s"         => \$opt_package_name,      # Name of the package to query
85
                'option=s'      => \@opt_options,           # User options
98
                'option=s'          => \@opt_options,           # User options
-
 
99
                'patch:s'           => \$opt_patch,             # Generate a patch file ( for FeCru )
86
                );
100
                );
87
 
101
 
88
                #
102
                #
89
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
103
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
90
                #
104
                #
Line 92... Line 106...
92
#
106
#
93
#   Process help and manual options
107
#   Process help and manual options
94
#
108
#
95
pod2usage(-verbose => 0, -message => "Version: $VERSION")  if ($opt_help == 1  || ! $result );
109
pod2usage(-verbose => 0, -message => "Version: $VERSION")  if ($opt_help == 1  || ! $result );
96
pod2usage(-verbose => 1)  if ($opt_help == 2 );
110
pod2usage(-verbose => 1)  if ($opt_help == 2 );
97
pod2usage(-verbose => 2)  if ($opt_manual || ($opt_help > 2));
111
pod2usage(-verbose => 2)  if ($opt_help > 2 );
98
 
112
 
99
InitFileUtils();
113
InitFileUtils();
100
 
114
 
101
#
115
#
102
#   Configure the error reporting process now that we have the user options
116
#   Configure the error reporting process now that we have the user options
103
#
117
#
104
ErrorConfig( 'name'    => 'VCSDIFF',
118
ErrorConfig( 'name'    => 'VCSDIFF',
105
             'verbose' => $opt_verbose,
119
             'verbose' => $opt_verbose,
106
             'debug'   => $opt_debug );
120
             'debug'   => $opt_debug );
107
 
121
 
-
 
122
#
-
 
123
#   Sanity testing of user options
-
 
124
#   
108
Error ("Options -check and -diff cannot be combined")
125
Error ("Options -check and -diff cannot be combined")
109
    if ( $opt_md5check && $opt_diff );
126
    if ( $opt_md5check && $opt_diff );
-
 
127
Error ("Options -check and -patch cannot be combined")
-
 
128
    if ( $opt_md5check && defined($opt_patch) );
-
 
129
Error ("Options -diff and -patch cannot be combined")
-
 
130
    if ( $opt_diff && defined($opt_patch) );
110
 
131
 
111
#
132
#
112
#   Determine mode
133
#   Determine mode
113
#   Not all modes work on all machines
134
#   Not all modes work on all machines
114
#
135
#
115
Verbose ("Machine Type: UNIX=$UNIX");
136
Verbose ("Machine Type: UNIX=$UNIX");
116
if ( $opt_md5check )
137
if ( $opt_md5check )
117
{
138
{
118
    $opt_mode = 'md5';
139
    $opt_mode = 'md5';
119
}
140
}
120
elsif ( $UNIX || $opt_diff )
141
elsif ( $UNIX || $opt_diff || defined($opt_patch))
121
{
142
{
122
    $opt_mode = 'diff';
143
    $opt_mode = 'diff';
123
    $Name = 'diff';
144
    $Name = 'diff';
124
    push @DiffArgs, '-r';
145
    push @DiffArgs, '-r';
125
    $Name = 'gdiff';
146
    $Name = 'gdiff';
126
    $DiffProg = LocateProgInPath( $Name, '--All');
147
    $DiffProg = LocateProgInPath( $Name, '--All');
127
    unless ( $DiffProg =~ m~/~ )
148
    unless ( $DiffProg =~ m~/~ )
128
    {
149
    {
129
        $Name = 'diff';
150
        $Name = 'diff';
130
        $DiffProg = LocateProgInPath( $Name, '--All');
151
        $DiffProg = LocateProgInPath( $Name, '--All');
-
 
152
 
131
    }
153
    }
132
 
154
 
133
    Error ("Cannot locate a 'diff' utility in the users PATH")
155
    Error ("Cannot locate a 'diff' utility in the users PATH")
134
        unless ( $DiffProg =~ m~/~ );
156
        unless ( $DiffProg =~ m~/~ );
-
 
157
    $DiffProg =~ tr~\\~/~;
135
}
158
}
136
else
159
else
137
{
160
{
138
    $opt_mode = 'bc2';
161
    $opt_mode = 'bc2';
139
    $DiffWait = 1;
162
    $DiffWait = 1;
Line 183... Line 206...
183
#
206
#
184
Error ("TMP not found or not a directory")
207
Error ("TMP not found or not a directory")
185
    unless ( $TMP && -d $TMP );
208
    unless ( $TMP && -d $TMP );
186
$TMP = "$TMP/$$";
209
$TMP = "$TMP/$$";
187
 
210
 
-
 
211
#   Validate the users patch directory
-
 
212
if (defined($opt_patch))
-
 
213
{
-
 
214
    # Set deafult patch file name, if none is provided
-
 
215
    $opt_patch = 'vcsdiff.patch' if (length $opt_patch == 0);
-
 
216
    my $patchDir = StripFileExt($opt_patch);
-
 
217
    Error ("Directory does not exist: $patchDir") if length($patchDir) > 0;
-
 
218
    RmDirTree ($opt_patch);
-
 
219
}
-
 
220
 
-
 
221
#
-
 
222
#   Translate special label names.
-
 
223
#
-
 
224
$opt_old_label = translateSpecialLabelName( "old", $opt_old_label );
-
 
225
$opt_new_label = translateSpecialLabelName( "new", $opt_new_label );
-
 
226
 
188
#
227
#
189
#   Create views for the two views
228
#   Create views for the two views
190
#   Verify that the view are present
229
#   Verify that the view are present
191
#
230
#
192
Message ("Constructing views");
231
Message ("Constructing views");
-
 
232
Message ("  old = $opt_old_label" );
-
 
233
Message ("  new = $opt_new_label" );
193
my $path1 = create_view( $opt_old_label, 1 );
234
my $path1 = create_view( $opt_old_label, 1 );
194
my $path2 = create_view( $opt_new_label, 2 );
235
my $path2 = create_view( $opt_new_label, 2 );
195
 
236
 
196
Error ("Cannot locate view directory: $path1" ) unless (-d $path1);
237
Error ("Cannot locate view directory: $path1" ) unless (-d $path1);
197
Error ("Cannot locate view directory: $path2" ) unless (-d $path2);
238
Error ("Cannot locate view directory: $path2" ) unless (-d $path2);
Line 220... Line 261...
220
                '-rootdir', $path2 ) unless $rv;
261
                '-rootdir', $path2 ) unless $rv;
221
 
262
 
222
    exit $rv;
263
    exit $rv;
223
}
264
}
224
 
265
 
-
 
266
if ( defined($opt_patch))
-
 
267
{
-
 
268
    Verbose ("Creating a Patch File");
-
 
269
    Verbose ("Diff Utility: $DiffProg");
-
 
270
    @DiffArgs = qw(-U10000 -uNr -x.svn -x.git);
-
 
271
    my $rv = System ( '--Shell', $DiffProg, @DiffArgs, split(/,/, join (',', @opt_options)), $path1, $path2, '>', $opt_patch );
-
 
272
 
-
 
273
    #
-
 
274
    #   Warn if the patch file cannot be found
-
 
275
    if ( -f $opt_patch) {
-
 
276
        Message("Created patch: $opt_patch");
-
 
277
    } else {
-
 
278
        Error ("Expected patch file not found : $opt_patch");
-
 
279
    }
-
 
280
    exit $rv;
-
 
281
}
-
 
282
 
225
#
283
#
226
#   Diffing the paths
284
#   Diffing the paths
227
#   Will use BeyondCompare under Windows
285
#   Will use BeyondCompare under Windows
228
#   Will use diff under unix
286
#   Will use diff under unix
229
#
287
#
Line 345... Line 403...
345
    #
403
    #
346
    #   Split the user path into its component directory entries
404
    #   Split the user path into its component directory entries
347
    #   Start at the top and look for one of these in the view
405
    #   Start at the top and look for one of these in the view
348
    #
406
    #
349
    my @user_path = split ('/', $user_path );
407
    my @user_path = split ('/', $user_path );
-
 
408
    shift @user_path if $user_path[0] eq '';
350
    my $tpath = '';
409
    my $tpath = '';
351
    foreach my $dir ( @user_path )
410
    foreach my $dir ( @user_path )
352
    {
411
    {
353
        if ( -d "$view_path/$dir" )
412
        if ( -d "$view_path/$dir" )
354
        {
413
        {
Line 443... Line 502...
443
    Error ("BeyondCompare program not found", "Prog: $DiffProg")
502
    Error ("BeyondCompare program not found", "Prog: $DiffProg")
444
        unless ( -x $DiffProg );
503
        unless ( -x $DiffProg );
445
}
504
}
446
 
505
 
447
#-------------------------------------------------------------------------------
506
#-------------------------------------------------------------------------------
-
 
507
# Function        : findReleaseManagerPackage
-
 
508
#
-
 
509
# Description     : Find the package information by looking up its existing in 
-
 
510
#                   a given release.
-
 
511
#
-
 
512
# Inputs          : label_name
-
 
513
#                   label_value
-
 
514
#                   rtag_id
-
 
515
#                   package_name
-
 
516
#
-
 
517
# Returns         : 
-
 
518
#
-
 
519
sub findReleaseManagerPackage
-
 
520
{
-
 
521
    my ($label_name, $label_value) = @_;
-
 
522
    my (@row);
-
 
523
    my $found=0;
-
 
524
 
-
 
525
    if ( !$opt_rtag_id || !$opt_package_name )
-
 
526
    {
-
 
527
        Error( "Must specify -rtagid and -package options when the '$label_name' tag has the value '$label_value'" );
-
 
528
    }
-
 
529
    
-
 
530
    if ( !$package_vcs )
-
 
531
    {
-
 
532
 
-
 
533
        connectRM(\$RM_DB) unless ($RM_DB);
-
 
534
 
-
 
535
        # First get details from pv_id; split the package version and extension.
-
 
536
        my $pkg_ext;
-
 
537
        my $pkg_name;
-
 
538
        if ( $opt_package_name =~ m/(.*)\.(\w*)$/ )
-
 
539
        {
-
 
540
            $pkg_name = $1;
-
 
541
            $pkg_ext = $2;
-
 
542
        }
-
 
543
        else
-
 
544
        {
-
 
545
            $pkg_name = $opt_package_name;
-
 
546
        }
-
 
547
 
-
 
548
        my $m_sqlstr = "SELECT pv.PV_ID, pv.PKG_VERSION, release_manager.PK_RMAPI.return_vcs_tag(pv.PV_ID)".
-
 
549
                       " FROM RELEASE_MANAGER.RELEASE_CONTENT rc, RELEASE_MANAGER.PACKAGE_VERSIONS pv, RELEASE_MANAGER.PACKAGES pkg" .
-
 
550
                       " WHERE rc.RTAG_ID = $opt_rtag_id AND rc.PV_ID = pv.PV_ID AND pv.PKG_ID = pkg.PKG_ID AND pkg.PKG_NAME = '$pkg_name'";
-
 
551
        if ( $pkg_ext )
-
 
552
        {
-
 
553
            $m_sqlstr .= " AND pv.V_EXT='.$pkg_ext'";
-
 
554
        }
-
 
555
        Verbose2( $m_sqlstr );
-
 
556
        my $sth = $RM_DB->prepare($m_sqlstr);
-
 
557
        if ( defined($sth) )
-
 
558
        {
-
 
559
            if ( $sth->execute( ) )
-
 
560
            {
-
 
561
                if ( $sth->rows )
-
 
562
                {
-
 
563
                    while ( @row = $sth->fetchrow_array )
-
 
564
                    {
-
 
565
                        my $pv_id = $row[0];
-
 
566
                        my $ver = $row[1];
-
 
567
                        my $vcs = $row[2];
-
 
568
                        
-
 
569
                        Verbose( "findReleaseManagerPackage: [$opt_rtag_id, $opt_package_name] ==> [ $pv_id, $ver, $vcs]" );
-
 
570
                        
-
 
571
                        $package_name = $opt_package_name;
-
 
572
                        $package_ver  = $ver;
-
 
573
                        $package_vcs  = $vcs;
-
 
574
                        
-
 
575
                        # Most packages are released of trunk...
-
 
576
                        my $match = '^(SVN::.*)\/trunk::.*$';
-
 
577
                        if ( $package_vcs =~ m/$match/ )
-
 
578
                        {
-
 
579
                            $package_vcs_base = $1;
-
 
580
                            Verbose( "findReleaseManagerPackage: base on trunk ==> $package_vcs_base" );
-
 
581
                        }
-
 
582
                        else
-
 
583
                        {
-
 
584
                            # ...but some are released of branches.
-
 
585
                            $match = '^(SVN::.*)\/branches\/([^:]+)::.*$';
-
 
586
                            if ( $package_vcs =~ m/$match/ )
-
 
587
                            {
-
 
588
                                $package_vcs_base = $1;
-
 
589
                                $package_release_branch = $2;
-
 
590
                                Verbose( "findReleaseManagerPackage: base on branch $package_release_branch ==> $package_vcs_base" );
-
 
591
                            }
-
 
592
                            else
-
 
593
                            {
-
 
594
                                Error ( "Unable to determine base path from VCS: $package_vcs" );
-
 
595
                            }
-
 
596
                        }
-
 
597
                        $found++;
-
 
598
                    }
-
 
599
                }
-
 
600
                $sth->finish();
-
 
601
            }
-
 
602
        }
-
 
603
        else
-
 
604
        {
-
 
605
            Error( "findReleaseManagerPackage:Prepare failure" );
-
 
606
        }
-
 
607
        
-
 
608
        if ( $found == 0 )
-
 
609
        {
-
 
610
            Error( "No package named $opt_package_name found in the release with rtag ID $opt_rtag_id" );
-
 
611
        }
-
 
612
        elsif ( $found > 1 )
-
 
613
        {
-
 
614
            Error( "Multiple packages named $opt_package_name found in the release with rtag ID $opt_rtag_id" );
-
 
615
        }
-
 
616
    }
-
 
617
}
-
 
618
 
-
 
619
#-------------------------------------------------------------------------------
-
 
620
# Function        : translateSpecialLabelName
-
 
621
#
-
 
622
# Description     : Translates the name of a label (-old or -new argument) 
-
 
623
#                   if it is one of the special values.
-
 
624
#
-
 
625
# Inputs          : label_name
-
 
626
#                   label_value
-
 
627
#
-
 
628
# Returns         : new label_value
-
 
629
#
-
 
630
sub translateSpecialLabelName
-
 
631
{
-
 
632
    my ($label_name, $label_value) = @_;
-
 
633
    
-
 
634
    if ( $label_value eq "released" )
-
 
635
    {
-
 
636
        #
-
 
637
        #   Get the exact version released in Release Manager.
-
 
638
        #
-
 
639
        findReleaseManagerPackage( $label_name, $label_value );
-
 
640
        return $package_vcs;
-
 
641
    }
-
 
642
    elsif ( $label_value eq "head" )
-
 
643
    {
-
 
644
        #
-
 
645
        #   Get the 'head' of the released branch in release manager; this is the trunk
-
 
646
        #   if the package is released off trunk or a branch if the package is getting
-
 
647
        #   released from a branch in this release area.
-
 
648
        #
-
 
649
        findReleaseManagerPackage( $label_name, $label_value );
-
 
650
        if ( $package_release_branch )
-
 
651
        {
-
 
652
            return $package_vcs_base . '/branches/' . $package_release_branch;
-
 
653
        }
-
 
654
        else
-
 
655
        {
-
 
656
            return $package_vcs_base . '/trunk'
-
 
657
        }
-
 
658
    }
-
 
659
    elsif ( $label_value =~ m/^branch=(.*)/ )
-
 
660
    {
-
 
661
        #
-
 
662
        #   Get a named branch for this package.
-
 
663
        #
-
 
664
        my $branch_name = $1;
-
 
665
        findReleaseManagerPackage( $label_name, $label_value );
-
 
666
        return $package_vcs_base . '/branches/' . $branch_name;
-
 
667
    }
-
 
668
    elsif ( $label_value eq "trunk" )
-
 
669
    {
-
 
670
        #
-
 
671
        #   Get the true trunk of this package.
-
 
672
        #
-
 
673
        findReleaseManagerPackage( $label_name, $label_value );
-
 
674
        return $package_vcs_base . '/trunk';
-
 
675
    }
-
 
676
    
-
 
677
    return $label_value;
-
 
678
}
-
 
679
 
-
 
680
 
-
 
681
#-------------------------------------------------------------------------------
448
# Function        : END
682
# Function        : END
449
#
683
#
450
# Description     : This function will be called as the program exits
684
# Description     : This function will be called as the program exits
451
#                   It will also be called under error conditions
685
#                   It will also be called under error conditions
452
#                   Close down stuff we created
686
#                   Close down stuff we created
Line 501... Line 735...
501
 Options:
735
 Options:
502
    -help               - Brief help message
736
    -help               - Brief help message
503
    -help -help         - Detailed help message
737
    -help -help         - Detailed help message
504
    -man                - Full documentation
738
    -man                - Full documentation
505
    -check              - Perform MD5SUM over both views
739
    -check              - Perform MD5SUM over both views
-
 
740
    -patch[=name]       - Create a patch file for the views
506
    -[no]diff           - Force the use of a 'diff' utility
741
    -[no]diff           - Force the use of a 'diff' utility
507
    -option=opt1,...    - Add user options to the command line
742
    -option=opt1,...    - Add user options to the command line
508
    -old=tag            - Old VcsTag (or dir=path)
743
    -old=tag            - Old VcsTag (or path or vcs keyword)
509
    -new=tag            - New VcsTag (or dir=path)
744
    -new=tag            - New VcsTag (or path or vcs keyword)
-
 
745
    -rtagid=xxx         - Specify the Release to process
-
 
746
    -package=xxx        - Specify the package to query from Release Manager
510
 
747
 
511
=head1 OPTIONS
748
=head1 OPTIONS
512
 
749
 
513
=over 8
750
=over 8
514
 
751
 
Line 531... Line 768...
531
If enabled the program will perform an MD5 Cheksum over the files in the first
768
If enabled the program will perform an MD5 Cheksum over the files in the first
532
view and compare that with files in the second view.
769
view and compare that with files in the second view.
533
 
770
 
534
This option cannot be used in conjunction with the '-diff' option'.
771
This option cannot be used in conjunction with the '-diff' option'.
535
 
772
 
-
 
773
=item B<-patch[=name]>
-
 
774
 
-
 
775
This option controls the mode in which the program will operate. If enabled the program
-
 
776
will generate a 'patch' file between the two views.
-
 
777
 
-
 
778
The patch file can be used to perform a 'Pre-commit' Code Review in tools such as Fisheye/Crucible.
-
 
779
 
-
 
780
If the name of the patch is not provided, the patch will be written to a faile called vcsdiff.patch otherwise
-
 
781
the user specified name will be used. The named patch can be created in a directory that exists.
-
 
782
 
-
 
783
The patch creation process will exclude directories called '.svn' and '.git'.
-
 
784
 
-
 
785
If using a development directory then it is recommended that all build files and artifactes be removed before the
-
 
786
patch is created. This can often be done with a 'jats clobber'.
-
 
787
 
536
=item B<-diff>
788
=item B<-diff>
537
 
789
 
538
This option controls the mode in which the program will operate.
790
This option controls the mode in which the program will operate.
539
 
791
 
540
By default the program is Operating System dependent. It will:
792
By default the program is Operating System dependent. It will:
Line 570... Line 822...
570
options, but not both.
822
options, but not both.
571
 
823
 
572
The tag may be of the form dir=path to force the utility to use a local
824
The tag may be of the form dir=path to force the utility to use a local
573
view or path.
825
view or path.
574
 
826
 
-
 
827
Additional tag values are available when generating differences against packages
-
 
828
that are released in Release Manager.  In order to do this specific -rtagid and
-
 
829
-package to specify the Release Manager package version.  Once
-
 
830
these are specified the following tags can be used:
-
 
831
 
-
 
832
=over 4
-
 
833
 
-
 
834
=item * released
-
 
835
 
-
 
836
Use the current released package version in Release Manager.
-
 
837
 
-
 
838
=item * head
-
 
839
 
-
 
840
Use the Subversion HEAD of the Release Manager release path.
-
 
841
 
-
 
842
=item * trunk
-
 
843
 
-
 
844
Use the HEAD of the Subversion trunk.
-
 
845
 
-
 
846
=item * branch=xxx
-
 
847
 
-
 
848
Use the HEAD of the Subversion branch named xxx.
-
 
849
 
-
 
850
=back
-
 
851
 
575
=item B<-new=tag>
852
=item B<-new=tag>
576
 
853
 
577
This option specifies the new, or current, VcsTag for the difference report. This
854
This option specifies the new, or current, VcsTag for the difference report. This
578
tag is mandatory.
855
tag is mandatory.
579
 
856
 
580
The old and new tags may be provided on the command line, or via named
857
Other than that, it has the same form as the -old tag described above.
581
options, but not both.
-
 
582
 
858
 
-
 
859
=item B<-rtagid=xxx>
-
 
860
 
583
The tag may be of the form dir=path to force the utility to use a local
861
This option specified an RTAG_ID that must be determined from Release Manager.
-
 
862
 
-
 
863
The RTAG_ID uniquely identifies a Release. The value can be read from the URL
-
 
864
used to view the release. ie:
-
 
865
 
-
 
866
 https://auawsaweb005/ManagerSuite/Release_Manager/dependencies.asp?rtag_id=17223
-
 
867
 
584
view or path.
868
=item B<-package=xxx>
-
 
869
 
-
 
870
Specifies the name of the package to query from Release Manager.  This can be
-
 
871
in the form of <package_name> or alternatly <package_name>.<ext> where <ext>
-
 
872
is the project-specific extension for that package.  The <package_name>.<ext>
-
 
873
variant is required when there is more than one package with the same name
-
 
874
in the release given by -rtagid.
585
 
875
 
586
=back
876
=back
587
 
877
 
588
=head1 DESCRIPTION
878
=head1 DESCRIPTION
589
 
879
 
Line 647... Line 937...
647
 
937
 
648
If one of the Vcs Tags is of the form:
938
If one of the Vcs Tags is of the form:
649
 
939
 
650
=over 8
940
=over 8
651
 
941
 
652
=item *
942
=item * current
653
 
943
 
654
current
944
=item * current=path
655
 
945
 
656
=item *
946
=item * dir=path
657
 
947
 
658
current=path
948
=back
659
 
949
 
-
 
950
Then the tag will be treated as a directory and will be used for one side
-
 
951
of the comparison.
-
 
952
 
-
 
953
If a Vcs Tag is of the form:
-
 
954
 
-
 
955
=over 8
-
 
956
 
-
 
957
=item * released
-
 
958
 
660
=item *
959
=item * head
661
 
960
 
662
dir=path
961
=item * trunk
-
 
962
 
-
 
963
=item * branch=xxx
663
 
964
 
664
=back
965
=back
665
 
966
 
666
Then the tag will be treated as a directory and will be used for one side
967
Then the source code is checked out of source control based on a Release Manager
667
of the comparison.
968
rtagid (-rtagid option) and package name (-package) option.
668
 
969
 
669
Two directories views will be created. These should be deleted by this program,
970
Two directories views will be created. These should be deleted by this program,
670
but may remain if the command line program is terminated.
971
but may remain if the command line program is terminated.
671
 
972
 
672
=head1 EXAMPLE
973
=head1 EXAMPLE
673
 
974
 
674
The following command will compare a Subversion view with a ClearCase view.
975
The following command will compare a Subversion view with a ClearCase view.
675
 
976
 
676
    jats vcsdiff SVN::AUPERASVN02/COTS/crc/tags/crc_26.4.0007.cr@18587 CC::/MASS_Dev_Infra/crc::crc_26.4.0006.cr -check
977
    jats vcsdiff SVN::AUPERASVN01/COTS/crc/tags/crc_26.4.0007.cr@18587 CC::/MASS_Dev_Infra/crc::crc_26.4.0006.cr -check
677
 
978
 
678
The following command will compare a Subversion View with a local directory
979
The following command will compare a Subversion View with a local directory
679
 
980
 
680
    jats vcsdiff SVN::AUPERASVN02/COTS/crc/tags/crc_26.4.0000.cr dir=crc
981
    jats vcsdiff SVN::AUPERASVN01/COTS/crc/tags/crc_26.4.0000.cr dir=crc
-
 
982
 
-
 
983
The following command will compare the release version of the ct-spa package from Pulse 2.7.0 with the current head of that package
-
 
984
 
-
 
985
    jats vcsdiff -rtagid=38970 -package=ct-spa released head
-
 
986
 
-
 
987
The following command will create a 'patch' file between the specified version of the crc package and the version in the 
-
 
988
directory named 'crc'.
-
 
989
 
-
 
990
    ats vcsdiff SVN::AUPERASVN01/COTS/crc/tags/crc_26.4.0000.cr dir=crc -patch
681
 
991
 
682
=cut
992
=cut
683
 
993