[Bps-public-commit] Prophet branch, master, updated. e148ebb1d13bab27e571ce0898a14f0bcc51c35c
spang at bestpractical.com
spang at bestpractical.com
Fri Aug 21 09:41:53 EDT 2009
The branch, master has been updated
via e148ebb1d13bab27e571ce0898a14f0bcc51c35c (commit)
via 7081938901813d5d235fde5c11000055516c3e68 (commit)
via 3058d4ad3296b8770ca1505da044bedb699f8b10 (commit)
from 295ab390685b3ae853b0dc582de5c6fcfed089b9 (commit)
Summary of changes:
lib/Prophet/CLI/Command/Info.pm | 28 +++++++++++++++++++++++-----
lib/Prophet/Replica.pm | 22 +++++++++++-----------
2 files changed, 34 insertions(+), 16 deletions(-)
- Log -----------------------------------------------------------------
commit 3058d4ad3296b8770ca1505da044bedb699f8b10
Author: Christine Spang <spang at bestpractical.com>
Date: Fri Aug 21 14:30:56 2009 +0100
Add resolutions replica info to info command
It's useful, at least for debugging.
diff --git a/lib/Prophet/CLI/Command/Info.pm b/lib/Prophet/CLI/Command/Info.pm
index 6493f65..050ef8f 100644
--- a/lib/Prophet/CLI/Command/Info.pm
+++ b/lib/Prophet/CLI/Command/Info.pm
@@ -18,11 +18,29 @@ sub run {
$self->print_usage if $self->has_arg('h');
- print "Prophet database: ".$self->handle->url." (@{[ref($self->handle)]})".$/;
- print "Database UUID: ".$self->handle->db_uuid.$/;
- print "Replica UUID: ".$self->handle->uuid.$/;
- print "Changesets: ".$self->handle->latest_sequence_no.$/;
- print "Known types: ".join(',', @{$self->handle->list_types} ).$/;
+ print "Records Database\n";
+ print "----------------\n";
+
+ print "Location: ".$self->handle->url." (@{[ref($self->handle)]})\n";
+ print "Database UUID: ".$self->handle->db_uuid."\n";
+ print "Replica UUID: ".$self->handle->uuid."\n";
+ print "Changesets: ".$self->handle->latest_sequence_no."\n";
+ print "Known types: ".join(',', @{$self->handle->list_types} )."\n\n";
+
+ print "Resolutions Database\n";
+ print "--------------------\n";
+
+ print "Location: "
+ .$self->handle->resolution_db_handle->url." (@{[ref($self->handle)]})\n";
+ print "Database UUID: "
+ .$self->handle->resolution_db_handle->db_uuid."\n";
+ print "Replica UUID: "
+ .$self->handle->resolution_db_handle->uuid."\n";
+ print "Changesets: "
+ .$self->handle->resolution_db_handle->latest_sequence_no."\n";
+ # known types get very unwieldy for resolutions
+ # print "Known types: "
+ # .join(',', @{$self->handle->resolution_db_handle->list_types} )."\n";
}
__PACKAGE__->meta->make_immutable;
commit 7081938901813d5d235fde5c11000055516c3e68
Author: Christine Spang <spang at bestpractical.com>
Date: Fri Aug 21 14:32:10 2009 +0100
Kill more tab/space mixage
diff --git a/lib/Prophet/Replica.pm b/lib/Prophet/Replica.pm
index fb4ffde..ff37575 100644
--- a/lib/Prophet/Replica.pm
+++ b/lib/Prophet/Replica.pm
@@ -101,13 +101,13 @@ sub get_handle {
}
Prophet::App->require($new_class);
- my $handle = $new_class->new(%args);
-
- if ($handle->replica_exists && $handle->db_uuid) {
- $handle->uuid_generator->set_uuid_scheme($handle->db_uuid);
- }
+ my $handle = $new_class->new(%args);
- return $handle;
+ if ($handle->replica_exists && $handle->db_uuid) {
+ $handle->uuid_generator->set_uuid_scheme($handle->db_uuid);
+ }
+
+ return $handle;
}
@@ -138,14 +138,14 @@ sub initialize {
return undef if $self->replica_exists;
- $self->uuid_generator->set_uuid_scheme($args{'db_uuid'}) if ($args{db_uuid});
+ $self->uuid_generator->set_uuid_scheme($args{'db_uuid'}) if ($args{db_uuid});
for ( $self->_on_initialize_create_paths ) {
mkpath( [ File::Spec->catdir( $self->fs_root => $_ ) ] );
}
- $self->initialize_backend(%args);
- $self->after_initialize->($self);
+ $self->initialize_backend(%args);
+ $self->after_initialize->($self);
}
commit e148ebb1d13bab27e571ce0898a14f0bcc51c35c
Author: Christine Spang <spang at bestpractical.com>
Date: Fri Aug 21 14:36:47 2009 +0100
Don't check db uuids backwards on merge
Closes 7A041904-66AB-11DD-AE9D-77633178437E
diff --git a/lib/Prophet/Replica.pm b/lib/Prophet/Replica.pm
index ff37575..a3076fe 100644
--- a/lib/Prophet/Replica.pm
+++ b/lib/Prophet/Replica.pm
@@ -236,8 +236,8 @@ sub import_changesets {
);
my $source = $args{'from'};
-
- $source->_check_db_uuids_on_merge(for => $self, force => $args{'force'});
+
+ $self->_check_db_uuids_on_merge(for => $source, force => $args{'force'});
warn "The source (@{[$source->url]}) does not exist" unless ($source->replica_exists);
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list