[Bps-public-commit] r16756 - in Prophet/branches/init-and-clone: . lib/Prophet
sartak at bestpractical.com
sartak at bestpractical.com
Sat Nov 8 00:58:05 EST 2008
Author: sartak
Date: Sat Nov 8 00:58:04 2008
New Revision: 16756
Modified:
Prophet/branches/init-and-clone/ (props changed)
Prophet/branches/init-and-clone/lib/Prophet/Replica/prophet.pm
Prophet/branches/init-and-clone/lib/Prophet/ReplicaExporter.pm
Log:
r75192 at onn: sartak | 2008-11-08 00:57:57 -0500
Need to propagate the resdb_uuid on publish, too
Modified: Prophet/branches/init-and-clone/lib/Prophet/Replica/prophet.pm
==============================================================================
--- Prophet/branches/init-and-clone/lib/Prophet/Replica/prophet.pm (original)
+++ Prophet/branches/init-and-clone/lib/Prophet/Replica/prophet.pm Sat Nov 8 00:58:04 2008
@@ -267,8 +267,10 @@
sub initialize {
my $self = shift;
- my %args = validate( @_, { db_uuid => 0,
- } );
+ my %args = validate(@_, {
+ db_uuid => 0,
+ resdb_uuid => 0,
+ });
if ( !$self->fs_root_parent ) {
@@ -300,7 +302,9 @@
$self->set_replica_version(1);
- $self->resolution_db_handle->initialize if (!$self->is_resdb);
+ $self->resolution_db_handle->initialize(db_uuid => $args{resdb_uuid})
+ if !$self->is_resdb;
+
$self->after_initialize->($self);
}
Modified: Prophet/branches/init-and-clone/lib/Prophet/ReplicaExporter.pm
==============================================================================
--- Prophet/branches/init-and-clone/lib/Prophet/ReplicaExporter.pm (original)
+++ Prophet/branches/init-and-clone/lib/Prophet/ReplicaExporter.pm Sat Nov 8 00:58:04 2008
@@ -24,7 +24,17 @@
my $self = shift;
confess "No target_path specified" unless $self->has_target_path;
my $replica = Prophet::Replica->new(url => "prophet:file://" . $self->target_path, app_handle => $self->app_handle);
- $replica->initialize(db_uuid => $self->source_replica->db_uuid);
+
+ my $src = $self->source_replica;
+ my %init_args = (
+ db_uuid => $src->db_uuid,
+ );
+
+ $init_args{resdb_uuid} = $src->resolution_db_handle->db_uuid
+ if !$src->is_resdb;
+
+ $replica->initialize(%init_args);
+
return $replica;
},
);
More information about the Bps-public-commit
mailing list