Test::AutoBuild::Counter::ChangeList - Generates a build counter based on source repository changelist


Test-AutoBuild documentation Contained in the Test-AutoBuild distribution.

Index


Code Index:

NAME

Top

Test::AutoBuild::Counter::ChangeList - Generates a build counter based on source repository changelist

SYNOPSIS

Top

  use Test::AutoBuild::Counter::ChangeList;

  my $counter = Test::AutoBuild::Counter::ChangeList->new(options => \%options);

  # Retrieve the current counter
  $counter->value();

METHODS

Top

$counter->generate();

Generates a build counter based on the source repository changelist. If multiple repositories are configured, the changelists of all of them will be combined with periods.

AUTHORS

Top

Daniel Berrange <dan@berrange.com>, Dennis Gregorovic <dgregorovic@alum.mit.edu>

COPYRIGHT

Top

SEE ALSO

Top

perl(1), Test::AutoBuild, Test::AutoBuild::Runtime


Test-AutoBuild documentation Contained in the Test-AutoBuild distribution.
# -*- perl -*-
#
# Test::AutoBuild::Counter::ChangeList
#
# Daniel Berrange <dan@berrange.com>
# Dennis Gregorovic <dgregorovic@alum.mit.edu>
#
# Copyright (C) 2005 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: ChangeList.pm,v 1.4 2007/12/08 17:35:16 danpb Exp $

package Test::AutoBuild::Counter::ChangeList;

use base qw(Test::AutoBuild::Counter);
use warnings;
use strict;
use Log::Log4perl;

sub generate {
    my $self = shift;
    my $runtime = shift;

    my $repo = $runtime->repository($self->option("repository"));

    return $repo->changelist($runtime);
}

1 # So that the require or use succeeds.

__END__