[Rt-commit] r5436 - in Test-Chimps: trunk/bin
zev at bestpractical.com
zev at bestpractical.com
Fri Jun 23 17:34:17 EDT 2006
Author: zev
Date: Fri Jun 23 17:34:16 2006
New Revision: 5436
Modified:
Test-Chimps/ (props changed)
Test-Chimps/trunk/bin/poll_and_submit.pl
Log:
r4248 at galvatron (orig r17): zev | 2006-06-21 17:00:44 -0400
r4247 at galvatron: zev | 2006-06-21 17:00:40 -0400
bug fixes and smarter revision handling for branches
Modified: Test-Chimps/trunk/bin/poll_and_submit.pl
==============================================================================
--- Test-Chimps/trunk/bin/poll_and_submit.pl (original)
+++ Test-Chimps/trunk/bin/poll_and_submit.pl Fri Jun 23 17:34:16 2006
@@ -31,14 +31,20 @@
my $info_out = `svn info $config->{$project}->{svn_uri}`;
$info_out =~ m/Revision: (\d+)/;
my $latest_revision = $1;
+ $info_out =~ m/Last Changed Revision: (\d+)/;
+ my $last_changed_revision = $1;
$info_out =~ m/Last Changed Author: (\w+)/;
my $author = $1;
my $old_revision = $config->{$project}->{revision};
- next unless $latest_revision > $old_revision;
+ next unless $last_changed_revision > $old_revision;
foreach my $revision (($old_revision + 1) .. $latest_revision) {
+ # only actually do the check out if the revision and last changed revision match for
+ # a particular revision
+ next unless revisions_match($config->{$project}->{svn_uri}, $revision);
+
$config->{$project}->{revision} = $revision;
checkout_project($config->{$project}, $revision);
@@ -66,18 +72,18 @@
}
@checkout_paths = ();
- my $report = Test::Smoke::Report->new(model => $model,
- extra_data =>
- { category => $project,
- subcategory => 'repository snapshot / ' . $Config{osname},
- project => scalar fileparse($config->{$project}->{svn_uri}),
- revision => $revision,
- author => $author,
- timestamp => scalar gmtime,
- duration => $duration});
+ my $report = Test::Chimps::Report->new(model => $model,
+ extra_data =>
+ { category => $project,
+ subcategory => 'repository snapshot / ' . $Config{osname},
+ project => scalar fileparse($config->{$project}->{svn_uri}),
+ revision => $revision,
+ author => $author,
+ timestamp => scalar gmtime,
+ duration => $duration});
- my $client = Test::Smoke::Report::Client->new(reports => [$report],
- server => 'http://galvatron.mit.edu/cgi-bin/report_server.pl');
+ my $client = Test::Chimps::Client->new(reports => [$report],
+ server => 'http://galvatron.mit.edu/cgi-bin/report_server.pl');
my ($status, $msg) = $client->send;
@@ -142,3 +148,16 @@
print "removing temporary directory $tmpdir\n";
rmtree($tmpdir, 0, 0);
}
+
+sub revisions_match {
+ my $uri = shift;
+ my $revision = shift;
+
+ my $info_out = `svn info -r $revision $uri`;
+ $info_out =~ m/Revision: (\d+)/;
+ my $latest_revision = $1;
+ $info_out =~ m/Last Changed Revision: (\d+)/;
+ my $last_changed_revision = $1;
+
+ return $latest_revision == $last_changed_revision;
+}
More information about the Rt-commit
mailing list