[Bps-public-commit] Prophet branch, master, updated. 0.73-5-gb688d91

spang at bestpractical.com spang at bestpractical.com
Mon Sep 28 01:17:53 EDT 2009


The branch, master has been updated
       via  b688d91cb0bd47d91e37fa22a534909940df60f1 (commit)
      from  e3645fd6d5dba382fc328aef2ba39dc9cc6b952f (commit)

Summary of changes:
 lib/Prophet/CLI/Command/Clone.pm |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit b688d91cb0bd47d91e37fa22a534909940df60f1
Author: Christine Spang <spang at mit.edu>
Date:   Sun Sep 27 22:57:07 2009 -0400

    Check target's existence before instantiating source obj
    
    Otherwise for foreign replicas that prompt for username/
    password during sync module instantiation, the user can have to enter
    their username and password BEFORE being told that the location they
    chose to clone to is not empty.
    
    Closes Debian bug #547078

diff --git a/lib/Prophet/CLI/Command/Clone.pm b/lib/Prophet/CLI/Command/Clone.pm
index 4780bff..b389ddf 100644
--- a/lib/Prophet/CLI/Command/Clone.pm
+++ b/lib/Prophet/CLI/Command/Clone.pm
@@ -25,11 +25,6 @@ sub run {
 
     $self->set_arg( 'to' => $self->app_handle->handle->url() );
 
-    $self->source( Prophet::Replica->get_handle(
-        url       => $self->arg('from'),
-        app_handle => $self->app_handle,
-    ));
-
     $self->target( Prophet::Replica->get_handle(
         url       => $self->arg('to'),
         app_handle => $self->app_handle,
@@ -43,6 +38,11 @@ sub run {
         die "The target replica path you specified can't be created.\n";
     }
 
+    $self->source( Prophet::Replica->get_handle(
+        url       => $self->arg('from'),
+        app_handle => $self->app_handle,
+    ));
+
     my %init_args;
     if ( $self->source->isa('Prophet::ForeignReplica') ) {
         $self->target->after_initialize( sub { shift->app_handle->set_db_defaults } );

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list