[Bps-public-commit] Prophet branch, master, updated. 71a048098f99f6653433763c989cc31a55ea0743
clkao at bestpractical.com
clkao at bestpractical.com
Mon Apr 20 03:31:40 EDT 2009
The branch, master has been updated
via 71a048098f99f6653433763c989cc31a55ea0743 (commit)
via d7dff79eb295be2a76d5ccfee1ad605b45a1d0a1 (commit)
via 54327b216e074c58b5767b43ddc1d7236ea186a1 (commit)
from 968cd787b4b50e4cea4c8e3801da8e44886723c1 (commit)
Summary of changes:
lib/Prophet/CLI/Command/Info.pm | 4 +++-
lib/Prophet/FilesystemReplica.pm | 3 ++-
lib/Prophet/Replica/prophet.pm | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 54327b216e074c58b5767b43ddc1d7236ea186a1
Author: Chia-liang Kao <clkao at clkao.org>
Date: Mon Apr 20 15:29:14 2009 +0800
verbatim flag for lwp_get for not decoding the content.
diff --git a/lib/Prophet/FilesystemReplica.pm b/lib/Prophet/FilesystemReplica.pm
index faf9ce0..f0fbd97 100644
--- a/lib/Prophet/FilesystemReplica.pm
+++ b/lib/Prophet/FilesystemReplica.pm
@@ -272,11 +272,12 @@ sub _get_changeset_index_handle {
sub lwp_get {
my $self = shift;
my $url = shift;
+ my $verbatim = shift;
my $response;
for ( 1 .. 4 ) {
$response = $self->lwp_useragent->get($url);
if ( $response->is_success ) {
- return $response->decoded_content;
+ return $verbatim ? $response->content : $response->decoded_content;
}
}
warn "Could not fetch " . $url . " - " . $response->status_line;
commit d7dff79eb295be2a76d5ccfee1ad605b45a1d0a1
Author: Chia-liang Kao <clkao at clkao.org>
Date: Mon Apr 20 15:29:50 2009 +0800
make _read_file_range actually work over lwp.
diff --git a/lib/Prophet/Replica/prophet.pm b/lib/Prophet/Replica/prophet.pm
index 280dcce..c72bacc 100644
--- a/lib/Prophet/Replica/prophet.pm
+++ b/lib/Prophet/Replica/prophet.pm
@@ -489,7 +489,7 @@ sub _read_file_range {
}
else {
# XXX: do range get if possible
- my $content = $self->lwp_get( $self->url . "/" . $args{path} );
+ my $content = $self->lwp_get( $self->url . "/" . $args{path}, 1 );
if ($args{whence} == 2) {
return substr($content, $args{position}, $args{length});
}
commit 71a048098f99f6653433763c989cc31a55ea0743
Author: Chia-liang Kao <clkao at clkao.org>
Date: Mon Apr 20 15:31:19 2009 +0800
display replica type and db uuid in prophet info.
diff --git a/lib/Prophet/CLI/Command/Info.pm b/lib/Prophet/CLI/Command/Info.pm
index bfbe894..a8b7f37 100644
--- a/lib/Prophet/CLI/Command/Info.pm
+++ b/lib/Prophet/CLI/Command/Info.pm
@@ -6,7 +6,9 @@ sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(), l => 'local' };
sub run {
my $self = shift;
- print "Working on prophet database: ".$self->handle->url.$/;
+ print "Working on prophet database: ".$self->handle->url." (@{[ref($self->handle)]})".$/;
+ print "DB UUID: ".$self->handle->db_uuid.$/;
+ print "Changets: ".$self->handle->latest_sequence_no.$/;
print "Known types: ".join(',', @{$self->handle->list_types} ).$/;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list