[Bps-public-commit] r11570 - in SVN-PropDB: t

clkao at bestpractical.com clkao at bestpractical.com
Sat Apr 5 22:47:03 EDT 2008


Author: clkao
Date: Sat Apr  5 22:46:55 2008
New Revision: 11570

Modified:
   SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm
   SVN-PropDB/t/sd-hm.t

Log:
sd-hm now passes.


Modified: SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm	(original)
+++ SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm	Sat Apr  5 22:46:55 2008
@@ -138,15 +138,17 @@
     my %args = validate( @_,   {task => 1, starting_transaction => 1 } );
 
     my $txns = $self->hm->search( 'TaskTransaction', task_id => $args{task} ) || [];
+    my @matched;
     foreach my $txn ( @$txns) {
         next if $txn->{'id'} < $args{'starting_transaction'};        # Skip things we've pushed
 
-        warn $txn->{'id'};
         next if $self->prophet_has_seen_transaction($txn->{'id'});
+
         $txn->{history_entries} = $self->hm->search( 'TaskHistory', transaction_id => $txn->{'id'} );
         $txn->{email_entries} = $self->hm->search( 'TaskEmail', transaction_id => $txn->{'id'} );
+        push @matched, $txn;
     }
-    return $txns;
+    return \@matched;
 
 }
 
@@ -168,16 +170,13 @@
        %{ $self->_recode_props_for_integrate($change) }
 
 
-    );#->{content}->{tasks};
-
-    warn Dumper( $task );
-
-    use Data::Dumper;
-    return $task->{content}->{id};
+    );
 
     my $txns = $self->hm->search( 'TaskTransaction', task_id => $task->{content}->{id} );
 
-    $self->record_pushed_transaction( transaction => $txns->[0]->id, changeset => $changeset );
+    # lalala
+    $self->record_pushed_transaction( transaction => $txns->[0]->{id}, changeset => $changeset );
+    return $task->{content}->{id};
 
 
 #    return $ticket->id;

Modified: SVN-PropDB/t/sd-hm.t
==============================================================================
--- SVN-PropDB/t/sd-hm.t	(original)
+++ SVN-PropDB/t/sd-hm.t	Sat Apr  5 22:46:55 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
 use warnings;
 use strict;
-use Prophet::Test tests => 3;
+use Prophet::Test tests => 10;
 
 use Test::More;
 BEGIN {



More information about the Bps-public-commit mailing list