[Bps-public-commit] r17392 - Prophet/trunk/lib/Prophet
jesse at bestpractical.com
jesse at bestpractical.com
Sat Dec 27 20:00:10 EST 2008
Author: jesse
Date: Sat Dec 27 20:00:10 2008
New Revision: 17392
Modified:
Prophet/trunk/lib/Prophet/Replica.pm
Log:
* Extract a method to record last-seen records
Modified: Prophet/trunk/lib/Prophet/Replica.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Replica.pm (original)
+++ Prophet/trunk/lib/Prophet/Replica.pm Sat Dec 27 20:00:10 2008
@@ -311,18 +311,24 @@
$self->begin_edit(source => $changeset);
$self->record_changes($changeset);
- my $state_handle = $self->state_handle;
- my $inside_edit = $state_handle->current_edit ? 1 : 0;
+ $self->record_changeset_integration($changeset);
- $state_handle->begin_edit(source => $changeset) unless ($inside_edit);
- $state_handle->record_integration_of_changeset($changeset);
- $state_handle->commit_edit() unless ($inside_edit);
$self->_set_original_source_metadata_for_current_edit($changeset);
$self->commit_edit;
return;
}
+sub record_changeset_integration {
+ my $self = shift;
+ my $changeset = shift;
+ my $state_handle = $self->state_handle;
+ my $inside_edit = $state_handle->current_edit ? 1 : 0;
+ $state_handle->begin_edit(source => $changeset) unless ($inside_edit);
+ $state_handle->record_integration_of_changeset($changeset);
+ $state_handle->commit_edit() unless ($inside_edit);
+}
+
=head3 last_changeset_from_source $SOURCE_UUID
Returns the last changeset id seen from the replica identified by $SOURCE_UUID.
More information about the Bps-public-commit
mailing list