[Bps-public-commit] SD branch, master, updated. 0.74-73-ga15c07f
Christine Spang
spang at bestpractical.com
Sun Feb 20 19:01:08 EST 2011
The branch, master has been updated
via a15c07fbe351af09e96b4b6c9bf6c1e36918b3e9 (commit)
via 39213fe2cc86192d28c4ca69d1c5f3851ffe7d3f (commit)
from ed6d9212f4c84777eca188202b6d2e56d47b92d5 (commit)
Summary of changes:
lib/App/SD/ForeignReplica/PullEncoder.pm | 10 +++++++---
lib/App/SD/Replica/gcode/PullEncoder.pm | 1 -
lib/App/SD/Replica/github/PullEncoder.pm | 1 -
lib/App/SD/Replica/lighthouse/PullEncoder.pm | 1 -
lib/App/SD/Replica/rt/PullEncoder.pm | 1 -
lib/App/SD/Replica/trac/PullEncoder.pm | 1 -
6 files changed, 7 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 39213fe2cc86192d28c4ca69d1c5f3851ffe7d3f
Author: Christine Spang <christine at debian.org>
Date: Sun Feb 20 18:59:36 2011 -0500
use Prophet's ProgressBar role for pulling from foreign replicas
This, with current prophet, solves RT #64674. trs++ for reporting.
diff --git a/lib/App/SD/ForeignReplica/PullEncoder.pm b/lib/App/SD/ForeignReplica/PullEncoder.pm
index fefe3af..c5a4232 100644
--- a/lib/App/SD/ForeignReplica/PullEncoder.pm
+++ b/lib/App/SD/ForeignReplica/PullEncoder.pm
@@ -3,6 +3,8 @@ use Any::Moose;
use App::SD::Util;
use Params::Validate qw/validate/;
+with 'Prophet::CLI::ProgressBar';
+
sub run {
my $self = shift;
my %args = validate( @_, { after => 1});
@@ -20,13 +22,15 @@ sub run {
my ( $last_modified, $last_txn, @changesets );
- my $progress = Time::Progress->new();
- $progress->attr( max => $#$tickets );
+ my $progress = $self->progress_bar(
+ max => $#$tickets,
+ format => "Fetching ticket history %30b %p Est: %E\r",
+ );
for my $ticket (@$tickets) {
$counter++;
my $changesets;
- print $progress->report( "Fetching ticket history %30b %p Est: %E\r", $counter );
+ print $progress->();
$self->sync_source->log_debug( "Fetching $counter of " . scalar @$tickets . " tickets");
( $last_modified, $changesets ) = $self->transcode_ticket( $ticket, $last_modified );
unshift @changesets, @$changesets;
commit a15c07fbe351af09e96b4b6c9bf6c1e36918b3e9
Author: Christine Spang <christine at debian.org>
Date: Sun Feb 20 18:40:11 2011 -0500
remove unused Time::Progress imports
diff --git a/lib/App/SD/Replica/gcode/PullEncoder.pm b/lib/App/SD/Replica/gcode/PullEncoder.pm
index 5d46902..7df4193 100644
--- a/lib/App/SD/Replica/gcode/PullEncoder.pm
+++ b/lib/App/SD/Replica/gcode/PullEncoder.pm
@@ -4,7 +4,6 @@ extends 'App::SD::ForeignReplica::PullEncoder';
use Params::Validate qw(:all);
use Memoize;
-use Time::Progress;
use DateTime;
has sync_source => (
diff --git a/lib/App/SD/Replica/github/PullEncoder.pm b/lib/App/SD/Replica/github/PullEncoder.pm
index 242816f..b10bae5 100644
--- a/lib/App/SD/Replica/github/PullEncoder.pm
+++ b/lib/App/SD/Replica/github/PullEncoder.pm
@@ -4,7 +4,6 @@ extends 'App::SD::ForeignReplica::PullEncoder';
use Params::Validate qw(:all);
use Memoize;
-use Time::Progress;
use DateTime;
has sync_source => (
diff --git a/lib/App/SD/Replica/lighthouse/PullEncoder.pm b/lib/App/SD/Replica/lighthouse/PullEncoder.pm
index 318e98c..42c955a 100644
--- a/lib/App/SD/Replica/lighthouse/PullEncoder.pm
+++ b/lib/App/SD/Replica/lighthouse/PullEncoder.pm
@@ -4,7 +4,6 @@ extends 'App::SD::ForeignReplica::PullEncoder';
use Params::Validate qw(:all);
use Memoize;
-use Time::Progress;
use DateTime;
use Net::Lighthouse::User;
diff --git a/lib/App/SD/Replica/rt/PullEncoder.pm b/lib/App/SD/Replica/rt/PullEncoder.pm
index 0c24fcd..371c657 100644
--- a/lib/App/SD/Replica/rt/PullEncoder.pm
+++ b/lib/App/SD/Replica/rt/PullEncoder.pm
@@ -4,7 +4,6 @@ extends 'App::SD::ForeignReplica::PullEncoder';
use Params::Validate qw(:all);
use Memoize;
-use Time::Progress;
use App::SD::Util;
has sync_source =>
diff --git a/lib/App/SD/Replica/trac/PullEncoder.pm b/lib/App/SD/Replica/trac/PullEncoder.pm
index a84ce2c..5d2aed8 100644
--- a/lib/App/SD/Replica/trac/PullEncoder.pm
+++ b/lib/App/SD/Replica/trac/PullEncoder.pm
@@ -4,7 +4,6 @@ extends 'App::SD::ForeignReplica::PullEncoder';
use Params::Validate qw(:all);
use Memoize;
-use Time::Progress;
has sync_source => (
isa => 'App::SD::Replica::trac',
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list