Changeset 1321
- Timestamp:
- 08/15/06 18:06:10
- Files:
-
- trunk/plagger/tools/smoker.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/tools/smoker.pl
r1320 r1321 4 4 use File::Path; 5 5 use File::Temp qw(tempdir); 6 use LWP::Simple; 6 7 use YAML; 7 8 … … 10 11 11 12 my $config = eval { YAML::LoadFile($file) } || {}; 12 my $current = get_current($repo) ;13 my $current = get_current($repo) or die "Can't get Revision from $repo"; 13 14 14 15 $config->{revision} ||= $current - 1; 15 16 16 while ($config->{revision}++ <= $current) { 17 my $run; 18 while (++$config->{revision} <= $current) { 17 19 run_chimps($config->{revision}); 20 $run++; 18 21 } 19 22 20 YAML::DumpFile($file, $config); 23 $config->{revision} = $current; 24 YAML::DumpFile($file, $config) if $run; 21 25 22 26 sub run_chimps { … … 44 48 rmtree("$workdir/$checkout"); 45 49 } 50 51 sub get_current { 52 my $repo = shift; 53 my $html = LWP::Simple::get($repo); 54 $html =~ /Revision (\d+):/ and return $1; 55 return; 56 }
