Subversion Repositories DevTools

Rev

Rev 5709 | Blame | Compare with Previous | Last modification | View Log | RSS feed

########################################################################
# COPYRIGHT - VIX IP PTY LTD ("VIX"). ALL RIGHTS RESERVED.
#
# Module name   : jats_svn_list.pl
# Module type   : Makefile system
# Compiler(s)   : Perl
# Environment(s): jats
#
# Description   : List packages in a Repo
#
#......................................................................#

require 5.008_002;
use strict;
use warnings;

use Pod::Usage;
use Getopt::Long;

use JatsError;
use JatsSystem;
use JatsRmApi;
use JatsSvn qw(:All);
use JatsCopy;


my $VERSION = "1.0.0";                          # Update this

#
#   Options
#
my $opt_debug   = $ENV{'GBE_DEBUG'};            # Allow global debug
my $opt_verbose = $ENV{'GBE_VERBOSE'};          # Allow global verbose
my $opt_help = 0;
my $opt_repo;                                   # Repo to list

#-------------------------------------------------------------------------------
# Function        : Mainline Entry Point
#
# Description     :
#
# Inputs          :
#
my $result = GetOptions (
                "help:+"        => \$opt_help,              # flag, multiple use allowed
                "manual:3"      => \$opt_help,              # flag
                "verbose:+"     => \$opt_verbose,           # flag, multiple use allowed
                'repo:s'        => \$opt_repo,
                );

                #
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
                #

#
#   Process help and manual options
#
pod2usage(-verbose => 0, -message => "Version: $VERSION") if ($opt_help == 1 || ! $result);
pod2usage(-verbose => 1) if ($opt_help == 2 );
pod2usage(-verbose => 2) if ($opt_help > 2);

#
#   Configure the error reporting process now that we have the user options
#
ErrorConfig( 'name'    =>'SVNLIST',
             'verbose' => $opt_verbose,
            );


#
#   Assume there are two arguemnts
#       Package Name
#       Package Version
#
$opt_repo = $ARGV[0] unless ( $opt_repo );

Error ("Need to specify a REPO" )
    unless ( $opt_repo );

#
#   Ensure that the package version does not already exist
#
#
#   Create an SVN session
#
my $svn = NewSessionByUrl ( $opt_repo );
#DebugDumpData("svn", $svn );
my ($plist, $tlist) = $svn->SvnListPackages( $svn->Full(),
                        {
                        Progress => 1,
                        Branch => 'ITSO_HOPS_3',
                        Show => 0,
                        } );
#DebugDumpData("Packages", $plist );
DebugDumpData("Tags", $tlist );

#-------------------------------------------------------------------------------
#   Documentation
#

=pod

=head1 NAME

svn_pump - Pump packages from ClearCase to Subversion

=head1 SYNOPSIS

  jats svn_pump [options] [packageName PackageVersion]

 Options:
    -help              - brief help message
    -help -help        - Detailed help message
    -man               - Full documentation
    -path=name         - ClearCase path to source
    -label=text        - ClearCase label of source
    -package=name      - Package Name
    -version=text      - Package Name
    -repo=url          - Base URL of the Repo

=head1 OPTIONS

=over 8

=item B<-help>

Print a brief help message and exits.

=item B<-help -help>

Print a detailed help message with an explanation for each option.

=item B<-man>

Prints the manual page and exits.

=back

=head1 DESCRIPTION

This program will extract a package from clearcase and put it into a
subversion repository.

If -label and -path are not provided, the program will use the RM database
to determine the values.

=cut