[Bps-public-commit] Prophet branch, master, updated. 2cc8f2250776d08d6d3417233b513b9119813770
Alex M Vandiver
alexmv at bestpractical.com
Mon Apr 27 14:14:08 EDT 2009
The branch, master has been updated
via 2cc8f2250776d08d6d3417233b513b9119813770 (commit)
from 82f5e6d8cef158170fb78484da26767479810074 (commit)
Summary of changes:
lib/Prophet/Replica/file.pm | 9 ++++++++-
lib/Prophet/Replica/prophet.pm | 5 -----
2 files changed, 8 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 2cc8f2250776d08d6d3417233b513b9119813770
Author: Alex Vandiver <alexmv at mit.edu>
Date: Mon Apr 27 14:13:02 2009 -0400
Fix c9403a -- only local replicas have a replica_exists, not remotes
diff --git a/lib/Prophet/Replica/file.pm b/lib/Prophet/Replica/file.pm
index c60d150..b6ffc36 100644
--- a/lib/Prophet/Replica/file.pm
+++ b/lib/Prophet/Replica/file.pm
@@ -2,11 +2,18 @@ package Prophet::Replica::file;
use base 'Prophet::Replica::prophet';
sub scheme { 'file' }
+sub replica_exists {
+ my $self = shift;
+ return -d $self->fs_root ? 1 : 0;
+}
+
sub new {
my $class = shift;
my %args = @_;
- for (qw/sqlite prophet/) {
+ my @types = ('sqlite');
+ unshift @types, $ENV{PROPHET_REPLICA_TYPE} if $ENV{PROPHET_REPLICA_TYPE};
+ for (@types) {
my $ret = eval {
my $other = "Prophet::Replica::$_";
Prophet::App->require($other);
diff --git a/lib/Prophet/Replica/prophet.pm b/lib/Prophet/Replica/prophet.pm
index a42ea79..8df13bf 100644
--- a/lib/Prophet/Replica/prophet.pm
+++ b/lib/Prophet/Replica/prophet.pm
@@ -110,11 +110,6 @@ use constant userdata_dir => 'userdata';
use constant changeset_index => 'changesets.idx';
use constant local_metadata_dir => 'local_metadata';
-sub replica_exists {
- my $self = shift;
- return -d $self->fs_root ? 1 : 0;
-}
-
=head1 Replica Format
=head4 overview
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list