[Bps-public-commit] r14137 - in Prophet/trunk: . lib/Prophet/CLI/Command lib/Prophet/Replica lib/Prophet/Server

sartak at bestpractical.com sartak at bestpractical.com
Tue Jul 15 21:19:38 EDT 2008


Author: sartak
Date: Tue Jul 15 21:19:33 2008
New Revision: 14137

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/CLI/Command/Create.pm
   Prophet/trunk/lib/Prophet/ForeignReplica.pm
   Prophet/trunk/lib/Prophet/Record.pm
   Prophet/trunk/lib/Prophet/Replica/Native.pm
   Prophet/trunk/lib/Prophet/Server/REST.pm

Log:
 r64341 at onn:  sartak | 2008-07-15 21:19:13 -0400
 Some warnings cleanup


Modified: Prophet/trunk/lib/Prophet/CLI/Command/Create.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/Create.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/Create.pm	Tue Jul 15 21:19:33 2008
@@ -9,7 +9,7 @@
     my $record = $self->_get_record_class;
     my ($val, $msg) = $record->create( props => $self->edit_props );
     if (!$val) {
-        warn $msg ."\n";
+        warn "Unable to create record: " . $msg . "\n";
     }
     if (!$record->uuid) {
         warn "Failed to create " . $record->record_type . "\n";

Modified: Prophet/trunk/lib/Prophet/ForeignReplica.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/ForeignReplica.pm	(original)
+++ Prophet/trunk/lib/Prophet/ForeignReplica.pm	Tue Jul 15 21:19:33 2008
@@ -30,9 +30,12 @@
 sub conflicts_from_changeset { return; }
 sub can_write_changesets     {1}
 
-sub record_resolutions { die "not for foreign replicas" }
+sub record_resolutions { die "resolution handling is not for foreign replicas" }
 
-sub import_resolutions_from_remote_source { warn 'no resdb'; return }
+sub import_resolutions_from_remote_source {
+    warn 'resdb not implemented yet';
+    return
+}
 
 sub record_changes {
     my $self = shift;

Modified: Prophet/trunk/lib/Prophet/Record.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Record.pm	(original)
+++ Prophet/trunk/lib/Prophet/Record.pm	Tue Jul 15 21:19:33 2008
@@ -90,9 +90,8 @@
         );
     } elsif ( $foreign_class->isa('Prophet::Record') ) {
 
-        #        warn "not yet";
     } else {
-        die "wtf";
+        die "Your foreign class ($foreign_class) must be a subclass of Prophet::Record or Prophet::Collection";
     }
 
 }

Modified: Prophet/trunk/lib/Prophet/Replica/Native.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Replica/Native.pm	(original)
+++ Prophet/trunk/lib/Prophet/Replica/Native.pm	Tue Jul 15 21:19:33 2008
@@ -89,12 +89,6 @@
         =~ s/^prophet://;  # url-based constructor in ::replica should do better
     $self->{url} =~ s{/$}{};
     $self->_probe_or_create_db();
-
-
-    #    warn "I AM ".$ENV{'PROPHET_USER'};
-    #    warn $self->uuid;
-    #    warn $self->state_handle->uuid unless ($self->is_state_handle);
-
 }
 
 sub state_handle { return shift; }

Modified: Prophet/trunk/lib/Prophet/Server/REST.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Server/REST.pm	(original)
+++ Prophet/trunk/lib/Prophet/Server/REST.pm	Tue Jul 15 21:19:33 2008
@@ -56,7 +56,7 @@
         my $type = $1;
         my $col = Prophet::Collection->new( handle => $self->prophet_handle, type => $type );
         $col->matching( sub {1} );
-        warn "Todo. query language";
+        warn "Query language not implemented yet.";
         return $self->_send_content(
             content_type => 'text/x-json',
             content      => to_json( { map { $_->uuid => "/records/$type/" . $_->uuid . ".json" } @$col } )



More information about the Bps-public-commit mailing list