# -*- perl -*- # # Test::AutoBuild::Repository by Daniel Berrange # # Copyright (C) 2002 Daniel Berrange # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Repository.pm,v 1.13 2007/12/08 21:03:02 danpb Exp $ =pod =head1 NAME Test::AutoBuild::Repository - Source control repository access =head1 SYNOPSIS use Test::AutoBuild::Repository my $rep = Test::AutoBuild::Repository->new( name => $name, options => \%options, env => \%env, label => $label); # Checkout / update the location '$src_path' # into local directory '$dst_path' my ($changed, $changes) = $rep->export($runtime, $src_path, $dst_path); # If the repository impl supports it, get the more # recent repository global changelist number my $changelist = $rep->changelist($runtime); =head1 DESCRIPTION This module provides the API for interacting with the source control repositories. A repository implementation has to be able to do two main things * Get a checkout of a new module * Update an existing checkout, determining if any changes where made Optionally, it can also extract & return the details of all changelists committed since the previous checkout operation. =head1 CONFIGURATION The valid configuration options for the C block are =head1 METHODS =over 4 =cut package Test::AutoBuild::Repository; use strict; use warnings; use Test::AutoBuild::Lib; use Log::Log4perl; use Class::MethodMaker [ new => [qw/ -init new /], scalar => [qw/ name label /]]; =item my $rep = Test::AutoBuild::Repository->new(name => $name, label => $label, options => \%options, env => \%env); This method creates a new repository. The C argument is an alphanumeric token representing the name of the repository. The C