[Bps-public-commit] Prophet - A disconnected, replicated p2p database branch, master, updated. c500b5c80114a1a1d1af9fdec79d23d6f98202bb
spang at bestpractical.com
spang at bestpractical.com
Thu Jan 22 05:41:04 EST 2009
The branch, master has been updated
via c500b5c80114a1a1d1af9fdec79d23d6f98202bb (commit)
via 6a6fcb1215930ae9a0580fa89b5e41da75817997 (commit)
via aa5af261a3a190cfb93c1e77a1fd63d7ae9a7e6b (commit)
via 54037c4fdcb40037a8e97b822f37e5751ad8ecc6 (commit)
from 0e38b8b8ba288ea2f32233bcbae2711ac6ae6c7e (commit)
Summary of changes:
lib/Prophet/App.pm | 3 +++
lib/Prophet/CLI/Command/Clone.pm | 8 ++++++++
lib/Prophet/CLI/Dispatcher.pm | 2 +-
lib/Prophet/Record.pm | 1 -
4 files changed, 12 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 54037c4fdcb40037a8e97b822f37e5751ad8ecc6
Author: Christine Spang <spang at bestpractical.com>
Date: Wed Jan 21 10:02:17 2009 +0200
fix copy-paste error in this comment
diff --git a/lib/Prophet/CLI/Dispatcher.pm b/lib/Prophet/CLI/Dispatcher.pm
index c33cf1f..e520006 100644
--- a/lib/Prophet/CLI/Dispatcher.pm
+++ b/lib/Prophet/CLI/Dispatcher.pm
@@ -37,7 +37,7 @@ on qr{^(publish|push) (\S+)$} => sub {
run($1, $self);
};
-# clone http://fsck.com/~jesse/sd-bugs => clone --to http://fsck.com/~jesse/sd-bugs
+# clone http://fsck.com/~jesse/sd-bugs => clone --from http://fsck.com/~jesse/sd-bugs
on qr{^(clone|pull) (\S+)$} => sub {
my $self = shift;
$self->context->set_arg(from => $2);
commit aa5af261a3a190cfb93c1e77a1fd63d7ae9a7e6b
Author: Christine Spang <spang at bestpractical.com>
Date: Wed Jan 21 11:22:30 2009 +0200
make sure clone command has a from arg
diff --git a/lib/Prophet/CLI/Command/Clone.pm b/lib/Prophet/CLI/Command/Clone.pm
index ef3d5c0..45cd9bd 100644
--- a/lib/Prophet/CLI/Command/Clone.pm
+++ b/lib/Prophet/CLI/Command/Clone.pm
@@ -5,6 +5,8 @@ extends 'Prophet::CLI::Command::Merge';
sub run {
my $self = shift;
+ $self->validate_args();
+
$self->set_arg( 'to' => $self->app_handle->handle->url() );
my $source = Prophet::Replica->get_handle(
@@ -44,6 +46,12 @@ sub run {
$self->SUPER::run();
}
+sub validate_args {
+ my $self = shift;
+ die "Please specify a --from.\n"
+ unless $self->has_arg('from');
+}
+
# When we clone from another replica, we ALWAYS want to take their way forward,
# even when there's an insane, impossible conflict
#
commit 6a6fcb1215930ae9a0580fa89b5e41da75817997
Author: Christine Spang <spang at bestpractical.com>
Date: Wed Jan 21 12:08:42 2009 +0200
ow: fix a bug where the class ends in :: and thus cannot be required
(but split used to strip that off and treat it as the class before the
::)
diff --git a/lib/Prophet/App.pm b/lib/Prophet/App.pm
index 17a3641..b79dab5 100644
--- a/lib/Prophet/App.pm
+++ b/lib/Prophet/App.pm
@@ -158,6 +158,9 @@ Helper function to test whether a given class has already been require'd.
sub already_required {
my ($self, $class) = @_;
+
+ return 0 if $class =~ /::$/; # malformed class
+
my $path = join('/', split(/::/,$class)).".pm";
return ( $INC{$path} ? 1 : 0);
}
commit c500b5c80114a1a1d1af9fdec79d23d6f98202bb
Author: Christine Spang <spang at bestpractical.com>
Date: Thu Jan 22 10:41:15 2009 +0200
type is not a class attribute, it should have a default set in the
inheriting record class
diff --git a/lib/Prophet/Record.pm b/lib/Prophet/Record.pm
index bf500ea..2312f91 100644
--- a/lib/Prophet/Record.pm
+++ b/lib/Prophet/Record.pm
@@ -183,7 +183,6 @@ sub register_record_reference {
my $record = $record_class->new(
app_handle => $self->app_handle,
handle => $self->handle,
- type => $record_class->type,
);
$record->load(uuid => $self->prop($args{by}));
return $record;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list