diff options
author | Florent Villard <warly@mandriva.com> | 2006-10-16 16:26:42 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2006-10-16 16:26:42 +0000 |
commit | db4080d6ec327d2f26b3c7d9395bfe71f210abf1 (patch) | |
tree | fd088c5b1805f1fe4c8bc574b07c08fe79b57271 /lib/Youri/Submit/Check/History.pm | |
parent | 363a191019f34e2f78edd2a92cd02be004ee4fd2 (diff) | |
download | mga-youri-submit-db4080d6ec327d2f26b3c7d9395bfe71f210abf1.tar mga-youri-submit-db4080d6ec327d2f26b3c7d9395bfe71f210abf1.tar.gz mga-youri-submit-db4080d6ec327d2f26b3c7d9395bfe71f210abf1.tar.bz2 mga-youri-submit-db4080d6ec327d2f26b3c7d9395bfe71f210abf1.tar.xz mga-youri-submit-db4080d6ec327d2f26b3c7d9395bfe71f210abf1.zip |
merging dev with upstream
Diffstat (limited to 'lib/Youri/Submit/Check/History.pm')
-rw-r--r-- | lib/Youri/Submit/Check/History.pm | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/Youri/Submit/Check/History.pm b/lib/Youri/Submit/Check/History.pm index 82a1b05..326f2f1 100644 --- a/lib/Youri/Submit/Check/History.pm +++ b/lib/Youri/Submit/Check/History.pm @@ -1,9 +1,9 @@ # $Id$ -package Youri::Upload::Check::History; +package Youri::Submit::Check::History; =head1 NAME -Youri::Upload::Check::History - Non-linear history check +Youri::Submit::Check::History - Non-linear history check =head1 DESCRIPTION @@ -16,19 +16,22 @@ use warnings; use strict; use Carp; use Youri::Package; -use base qw/Youri::Upload::Check/; +use base qw/Youri::Submit::Check/; sub run { my ($self, $package, $repository, $target, $define) = @_; croak "Not a class method" unless ref $self; + my @errors; + my $last_revision = $repository->get_last_older_revision($package, $target, $define); if ($last_revision) { # skip the test if last revision has been produced from another source package, as it occurs during package split/merges - return 1 - if $last_revision->get_canonical_name() ne $package->get_canonical_name(); + return + if $last_revision->get_canonical_name() + ne $package->get_canonical_name(); my ($last_revision_number) = $last_revision->get_last_change()->[Youri::Package::CHANGE_AUTHOR] =~ /(\S+)\s*$/; my %entries = @@ -37,12 +40,14 @@ sub run { map { $_->[Youri::Package::CHANGE_AUTHOR] } $package->get_changes(); unless ($entries{$last_revision_number}) { - $self->{_error} = "Last changelog entry $last_revision_number from last revision " . $last_revision->get_full_name() . " missing from current changelog"; - return 0; + push( + @errors, + "Last changelog entry $last_revision_number from last revision " . $last_revision->get_full_name() . " missing from current changelog" + ); } } - return 1; + return @errors; } =head1 COPYRIGHT AND LICENSE |