[Bps-public-commit] r16757 - in Prophet/branches/init-and-clone: lib/Prophet/CLI/Command
sartak at bestpractical.com
sartak at bestpractical.com
Sat Nov 8 01:03:02 EST 2008
Author: sartak
Date: Sat Nov 8 01:03:02 2008
New Revision: 16757
Modified:
Prophet/branches/init-and-clone/ (props changed)
Prophet/branches/init-and-clone/lib/Prophet/CLI/Command/Clone.pm
Log:
r75194 at onn: sartak | 2008-11-08 01:02:56 -0500
More cleaner implementation of uuid propagation during clone; pass the db_uuid and resdb_uuid into initialize, instead of setting them after the fact
Modified: Prophet/branches/init-and-clone/lib/Prophet/CLI/Command/Clone.pm
==============================================================================
--- Prophet/branches/init-and-clone/lib/Prophet/CLI/Command/Clone.pm (original)
+++ Prophet/branches/init-and-clone/lib/Prophet/CLI/Command/Clone.pm Sat Nov 8 01:03:02 2008
@@ -24,11 +24,15 @@
die "The replica path you specified isn't writable";
}
- $target->initialize();
- $target->set_db_uuid($source->db_uuid)
- unless ($source->isa('Prophet::ForeignReplica'));
- $target->resolution_db_handle->set_db_uuid($source->resolution_db_handle->db_uuid)
- unless ($source->isa('Prophet::ForeignReplica'));
+ my %init_args;
+ unless ($source->isa('Prophet::ForeignReplica')) {
+ %init_args = (
+ db_uuid => $source->db_uuid,
+ resdb_uuid => $source->resolution_db_handle->db_uuid,
+ );
+ }
+ $target->initialize(%init_args);
+
$target->_write_cached_upstream_replicas($self->arg('from'));
$self->SUPER::run();
};
More information about the Bps-public-commit
mailing list