[Bps-public-commit] SD - A distributed issue tracker branch, master, updated. dba8d1252e0643e84ae5d3ca61e2b4271e674b0c

jesse jesse at bestpractical.com
Sat Feb 21 20:23:17 EST 2009


The branch, master has been updated
       via  dba8d1252e0643e84ae5d3ca61e2b4271e674b0c (commit)
       via  6a6766e33dda148c38341952f82681e75c5491c2 (commit)
       via  b389c5f4c220881153dd272fd6c4c8d7ad49cb4e (commit)
      from  1b118ca11c996178750be50d18cc08c10f7c3c1a (commit)

Summary of changes:
 Makefile.PL                                        |    3 +--
 lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm |    2 +-
 lib/App/SD/CLI/Command/Ticket/Comment/Create.pm    |    2 +-
 lib/App/SD/CLI/Command/Ticket/Create.pm            |    2 +-
 lib/App/SD/CLI/Command/Ticket/Search.pm            |    2 +-
 lib/App/SD/CLI/Command/Ticket/Show.pm              |    2 +-
 lib/App/SD/CLI/Command/Ticket/Update.pm            |    2 +-
 lib/App/SD/Replica/trac/PullEncoder.pm             |   13 +++++++------
 8 files changed, 14 insertions(+), 14 deletions(-)

- Log -----------------------------------------------------------------
commit b389c5f4c220881153dd272fd6c4c8d7ad49cb4e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sat Feb 21 20:22:17 2009 -0500

    Remove dep on Class::Method::Modifiers

diff --git a/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm b/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm
index d40b6cf..eb962ab 100644
--- a/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm
+++ b/lib/App/SD/CLI/Command/Ticket/Attachment/Create.pm
@@ -2,7 +2,7 @@ package App::SD::CLI::Command::Ticket::Attachment::Create;
 use Any::Moose;
 extends 'App::SD::CLI::Command::Attachment::Create';
 
-around ARG_TRANSLATIONS => sub { shift->(),  f => 'file'  };
+sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(),  f => 'file'  };
 
 # override args to feed in that ticket's uuid as an argument to the comment
 sub run {
diff --git a/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm b/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm
index 3365826..fa0be02 100644
--- a/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm
+++ b/lib/App/SD/CLI/Command/Ticket/Comment/Create.pm
@@ -5,7 +5,7 @@ extends 'Prophet::CLI::Command::Create';
 with 'App::SD::CLI::Model::TicketComment';
 with 'App::SD::CLI::Command';
 
-around ARG_TRANSLATIONS => sub { shift->(),  f => 'file', m => 'content'  };
+sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(),  f => 'file', m => 'content'  };
 
 # override args to feed in that ticket's uuid as an argument to the comment
 sub run {
diff --git a/lib/App/SD/CLI/Command/Ticket/Create.pm b/lib/App/SD/CLI/Command/Ticket/Create.pm
index 521727b..fe71d56 100644
--- a/lib/App/SD/CLI/Command/Ticket/Create.pm
+++ b/lib/App/SD/CLI/Command/Ticket/Create.pm
@@ -7,7 +7,7 @@ with 'App::SD::CLI::Model::Ticket';
 with 'App::SD::CLI::Command';
 with 'Prophet::CLI::TextEditorCommand';
 
-around ARG_TRANSLATIONS => sub { shift->(),  e => 'edit'  };
+sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(),  e => 'edit'  };
 
 # we want to launch an $EDITOR window to grab props and a comment if no
 # props are specified on the commandline
diff --git a/lib/App/SD/CLI/Command/Ticket/Search.pm b/lib/App/SD/CLI/Command/Ticket/Search.pm
index 306a20f..87adc92 100644
--- a/lib/App/SD/CLI/Command/Ticket/Search.pm
+++ b/lib/App/SD/CLI/Command/Ticket/Search.pm
@@ -3,7 +3,7 @@ use Any::Moose;
 extends 'Prophet::CLI::Command::Search';
 with 'App::SD::CLI::Command';
 
-around ARG_TRANSLATIONS => sub { shift->(),  s => 'sort', g => 'group'  };
+sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(),  s => 'sort', g => 'group'  };
 
 # frob the sort routine before running prophet's search command
 sub run {
diff --git a/lib/App/SD/CLI/Command/Ticket/Show.pm b/lib/App/SD/CLI/Command/Ticket/Show.pm
index 5f5f578..98c2e7d 100644
--- a/lib/App/SD/CLI/Command/Ticket/Show.pm
+++ b/lib/App/SD/CLI/Command/Ticket/Show.pm
@@ -4,7 +4,7 @@ extends 'Prophet::CLI::Command::Show';
 with 'App::SD::CLI::Command';
 with 'App::SD::CLI::Model::Ticket';
 
-around ARG_TRANSLATIONS => sub { shift->(),  a => 'all-props', s => 'skip-history',
+sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(),  a => 'all-props', s => 'skip-history',
                                         h => 'with-history', b => 'batch' };
 
 sub by_creation_date { $a->prop('created') cmp $b->prop('created') };
diff --git a/lib/App/SD/CLI/Command/Ticket/Update.pm b/lib/App/SD/CLI/Command/Ticket/Update.pm
index 1d96e23..b6eb6cc 100644
--- a/lib/App/SD/CLI/Command/Ticket/Update.pm
+++ b/lib/App/SD/CLI/Command/Ticket/Update.pm
@@ -7,7 +7,7 @@ with 'App::SD::CLI::Model::Ticket';
 with 'App::SD::CLI::Command';
 with 'Prophet::CLI::TextEditorCommand';
 
-around ARG_TRANSLATIONS => sub { shift->(),  a => 'all-props'  };
+sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(),  a => 'all-props'  };
 
 # use an editor to edit if no props are specified on the commandline,
 # allowing the creation of a new comment in the process

commit 6a6766e33dda148c38341952f82681e75c5491c2
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sat Feb 21 20:22:30 2009 -0500

    emove dep on DateTime::Format::ISO8601

diff --git a/lib/App/SD/Replica/trac/PullEncoder.pm b/lib/App/SD/Replica/trac/PullEncoder.pm
index fe84f7d..f001d82 100644
--- a/lib/App/SD/Replica/trac/PullEncoder.pm
+++ b/lib/App/SD/Replica/trac/PullEncoder.pm
@@ -6,7 +6,6 @@ use Params::Validate qw(:all);
 use Memoize;
 use Time::Progress;
 use DateTime;
-use DateTime::Format::ISO8601;
 
 has sync_source => (
     isa => 'App::SD::Replica::trac',
@@ -21,7 +20,7 @@ sub run {
             callback => 1,
         }
     );
-
+    $self->sync_source->log('Finding matching tickets');
     my @tickets = @{ $self->find_matching_tickets() };
 
     if ( @tickets == 0 ) {
@@ -29,6 +28,7 @@ sub run {
         return;
     }
 
+    warn "Time to get hist";
     my @changesets;
     my $counter = 0;
     $self->sync_source->log("Discovering ticket history");
@@ -39,6 +39,7 @@ sub run {
     my $last_modified_date;
 
     for my $ticket (@tickets) {
+        warn "working on a ticket";
         print $progress->report( "%30b %p Est: %E\r", $counter );
         $self->sync_source->log( "Fetching ticket @{[$ticket->id]} - " . ++$counter . " of " . scalar @tickets );
 
@@ -121,16 +122,16 @@ sub find_matching_tickets {
 
     my $last_changeset_seen_dt;
     if (my $last_changeset_seen =   $self->sync_source->fetch_local_metadata('last_changeset_date') ) {
-        $last_changeset_seen  =~ s/ /T/;
-        $last_changeset_seen_dt =  DateTime::Format::ISO8601->parse_datetime( $last_changeset_seen );
+        $last_changeset_seen_dt = Net::Trac::Ticket->timestamp_to_datetime($last_changeset_seen);
     }
 
+    $self->sync_source->log("Searching for tickets");
 
     my $search
         = Net::Trac::TicketSearch->new( connection => $self->sync_source->trac, limit => 500 );
     $search->query(%query);
     my @results = @{$search->results};
-
+     $self->sync_source->log("Trimming things after our last pull");
     if ($last_changeset_seen_dt) {
         # >= is wasteful but may catch race conditions
         @results = grep {$_->last_modified >= $last_changeset_seen_dt} @results; 
@@ -243,7 +244,7 @@ sub transcode_one_txn {
         }
     );
 
-    warn "right here, we need to deal with changed data that trac failed to record";
+#    warn "right here, we need to deal with changed data that trac failed to record";
 
     foreach my $prop_change ( values %{ $txn->prop_changes || {} } ) {
         my $new      = $prop_change->new_value;

commit dba8d1252e0643e84ae5d3ca61e2b4271e674b0c
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sat Feb 21 20:23:00 2009 -0500

    Update makefile.pl to jibe with reality

diff --git a/Makefile.PL b/Makefile.PL
index 1469754..20fc20e 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -5,7 +5,6 @@ copyright('2008 Best Practical Solutions, LLC');
 license('MIT');
 version_from('lib/App/SD.pm');
 requires('DateTime');
-requires('DateTime::Format::ISO8601');
 requires('Time::Progress');
 requires('Path::Class');
 requires 'Prophet'; # URI UNIVERSAL::require Params::Validate Class::Accessor Template::Declare::Tags Test::HTTP::Server::Simple JSON Test::WWW::Mechanize Any::Moose
@@ -34,7 +33,7 @@ recommends 'Email::Address';
 
 feature 'Trac sync' => 
         -default => 0,
-         'Net::Trac' => 0.06,
+         'Net::Trac' => 0.08,
         'LWP::Simple' => 0;
 
 recommends 'Net::Trac';

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list