Subversion Repositories DevTools

Rev

Rev 7299 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1341 dpurdie 1
########################################################################
7300 dpurdie 2
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
1341 dpurdie 3
#
4
# Module name   : jats_svn_list.pl
5
# Module type   : Makefile system
6
# Compiler(s)   : Perl
7
# Environment(s): jats
8
#
9
# Description   : List packages in a Repo
10
#
11
#......................................................................#
12
 
13
require 5.008_002;
14
use strict;
15
use warnings;
16
 
17
use Pod::Usage;
18
use Getopt::Long;
19
 
20
use JatsError;
21
use JatsSystem;
22
use JatsRmApi;
23
use JatsSvn qw(:All);
24
use JatsCopy;
25
 
26
 
27
my $VERSION = "1.0.0";                          # Update this
28
 
29
#
30
#   Options
31
#
32
my $opt_debug   = $ENV{'GBE_DEBUG'};            # Allow global debug
33
my $opt_verbose = $ENV{'GBE_VERBOSE'};          # Allow global verbose
34
my $opt_help = 0;
35
my $opt_repo;                                   # Repo to list
36
 
37
#-------------------------------------------------------------------------------
38
# Function        : Mainline Entry Point
39
#
40
# Description     :
41
#
42
# Inputs          :
43
#
44
my $result = GetOptions (
45
                "help:+"        => \$opt_help,              # flag, multiple use allowed
46
                "manual:3"      => \$opt_help,              # flag
47
                "verbose:+"     => \$opt_verbose,           # flag, multiple use allowed
48
                'repo:s'        => \$opt_repo,
49
                );
50
 
51
                #
52
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
53
                #
54
 
55
#
56
#   Process help and manual options
57
#
58
pod2usage(-verbose => 0, -message => "Version: $VERSION") if ($opt_help == 1 || ! $result);
59
pod2usage(-verbose => 1) if ($opt_help == 2 );
60
pod2usage(-verbose => 2) if ($opt_help > 2);
61
 
62
#
63
#   Configure the error reporting process now that we have the user options
64
#
65
ErrorConfig( 'name'    =>'SVNLIST',
66
             'verbose' => $opt_verbose,
67
            );
68
 
69
 
70
#
71
#   Assume there are two arguemnts
72
#       Package Name
73
#       Package Version
74
#
75
$opt_repo = $ARGV[0] unless ( $opt_repo );
76
 
77
Error ("Need to specify a REPO" )
78
    unless ( $opt_repo );
79
 
80
#
81
#   Ensure that the package version does not already exist
82
#
83
#
84
#   Create an SVN session
85
#
86
my $svn = NewSessionByUrl ( $opt_repo );
87
#DebugDumpData("svn", $svn );
88
my ($plist, $tlist) = $svn->SvnListPackages( $svn->Full(),
89
                        {
90
                        Progress => 1,
2023 dpurdie 91
                        Branch => 'ITSO_HOPS_3',
1341 dpurdie 92
                        Show => 0,
93
                        } );
94
#DebugDumpData("Packages", $plist );
95
DebugDumpData("Tags", $tlist );
96
 
97
#-------------------------------------------------------------------------------
98
#   Documentation
99
#
100
 
101
=pod
102
 
103
=head1 NAME
104
 
105
svn_pump - Pump packages from ClearCase to Subversion
106
 
107
=head1 SYNOPSIS
108
 
109
  jats svn_pump [options] [packageName PackageVersion]
110
 
111
 Options:
112
    -help              - brief help message
113
    -help -help        - Detailed help message
114
    -man               - Full documentation
115
    -path=name         - ClearCase path to source
116
    -label=text        - ClearCase label of source
117
    -package=name      - Package Name
118
    -version=text      - Package Name
119
    -repo=url          - Base URL of the Repo
120
 
121
=head1 OPTIONS
122
 
123
=over 8
124
 
125
=item B<-help>
126
 
127
Print a brief help message and exits.
128
 
129
=item B<-help -help>
130
 
131
Print a detailed help message with an explanation for each option.
132
 
133
=item B<-man>
134
 
135
Prints the manual page and exits.
136
 
137
=back
138
 
139
=head1 DESCRIPTION
140
 
141
This program will extract a package from clearcase and put it into a
142
subversion repository.
143
 
144
If -label and -path are not provided, the program will use the RM database
145
to determine the values.
146
 
147
=cut