projects
/
MojoFacets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
052be62
)
show status stats for actions processed
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 5 Jun 2010 19:42:11 +0000
(21:42 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 5 Jun 2010 19:42:11 +0000
(21:42 +0200)
script/actions-to-changes
patch
|
blob
|
history
diff --git
a/script/actions-to-changes
b/script/actions-to-changes
index
6f00529
..
f2a083b
100755
(executable)
--- a/
script/actions-to-changes
+++ b/
script/actions-to-changes
@@
-15,6
+15,8
@@
my @actions = @ARGV;
my $t = Mojo::Client->new;
$t->max_redirects( 1 );
my $t = Mojo::Client->new;
$t->max_redirects( 1 );
+my $stats;
+
foreach my $c ( sort {
my $at = $1 if $a =~ m/(\d+\.\d+)/;
my $bt = $1 if $b =~ m/(\d+\.\d+)/;
foreach my $c ( sort {
my $at = $1 if $a =~ m/(\d+\.\d+)/;
my $bt = $1 if $b =~ m/(\d+\.\d+)/;
@@
-30,11
+32,16
@@
foreach my $c ( sort {
warn "# hash ",dump($hash);
my $tx = $t->post_form( $url => $hash );
warn "# hash ",dump($hash);
my $tx = $t->post_form( $url => $hash );
- if ( my $res = $tx->success) { print $res->body }
- else {
+ if ( my $res = $tx->success) {
+ my $code = $res->code;
+ $stats->{$code}++;
+ print $code, ' ', $res->body
+ } else {
my ($code, $message) = $tx->error;
die "Error: $message";
}
# last if $max-- == 0;
}
my ($code, $message) = $tx->error;
die "Error: $message";
}
# last if $max-- == 0;
}
+
+warn "# stats ",dump($stats);