[Bps-public-commit] r15400 - Prophet/trunk/lib/Prophet

jesse at bestpractical.com jesse at bestpractical.com
Fri Aug 22 21:56:29 EDT 2008


Author: jesse
Date: Fri Aug 22 21:56:28 2008
New Revision: 15400

Modified:
   Prophet/trunk/lib/Prophet/Replica.pm

Log:
* Turns out that foreign replicas often need a changeset when integrating changes

Modified: Prophet/trunk/lib/Prophet/Replica.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Replica.pm	(original)
+++ Prophet/trunk/lib/Prophet/Replica.pm	Fri Aug 22 21:56:28 2008
@@ -881,10 +881,11 @@
 sub integrate_changes {
     my ($self, $changeset) = validate_pos( @_, {isa => 'Prophet::Replica'},
                                           { isa => 'Prophet::ChangeSet' } );
-    $self->_integrate_change($_) for ( $changeset->changes );
+    $self->_integrate_change($_, $changeset) for ( $changeset->changes );
+
 }
 
-=head2 _integrate_change L<Prophet::Change>
+=head2 _integrate_change L<Prophet::Change> <Prophet::ChangeSet>
 
 Integrates the given change into the current replica. Used in
 L</integrate_changes>.
@@ -893,7 +894,9 @@
 
 sub _integrate_change {
     my ($self, $change) = validate_pos(@_, { isa => 'Prophet::Replica' },
-                                           { isa => 'Prophet::Change' } );
+                                           { isa => 'Prophet::Change' }, 
+                                           { isa => 'Prophet::ChangeSet' } 
+);
 
     my %new_props = map { $_->name => $_->new_value } $change->prop_changes;
     if ( $change->change_type eq 'add_file' ) {



More information about the Bps-public-commit mailing list