[Bps-public-commit] SD branch, master, updated. 0.73-37-g933ae5a

spang at bestpractical.com spang at bestpractical.com
Sat Jan 9 17:03:19 EST 2010


The branch, master has been updated
       via  933ae5a5dd84fc324f4a430576fe2af22e0d81f8 (commit)
       via  5959c66f0e956a5e1784baa184beec5aaa9b5a3f (commit)
      from  ac0f5019a971e18fab04b3b190e357af097b4752 (commit)

Summary of changes:
 lib/App/SD/CLI/Command/Clone.pm |   10 +++++++++-
 t/sd-usage.t                    |    6 +++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 5959c66f0e956a5e1784baa184beec5aaa9b5a3f
Author: Christine Spang <spang at bestpractical.com>
Date:   Sat Jan 9 16:59:28 2010 -0500

    Mention --as and --local in clone usage message

diff --git a/lib/App/SD/CLI/Command/Clone.pm b/lib/App/SD/CLI/Command/Clone.pm
index 82e359d..1fbc4ba 100644
--- a/lib/App/SD/CLI/Command/Clone.pm
+++ b/lib/App/SD/CLI/Command/Clone.pm
@@ -13,11 +13,15 @@ sub usage_msg {
     my $cmd = $self->cli->get_script_name;
 
     return <<"END_USAGE";
-usage: ${cmd}clone --from <url> [--non-interactive]
+usage: ${cmd}clone --from <url> [--as <alias>] [--non-interactive] | --local
 
 Options:
     -n | --non-interactive - Don't prompt to specify email address for new
                              database
+    --as                   - Save an alias for this source, which can later be
+                             used instead of the URL.
+    --local                - Probe the local network for mDNS-advertised
+                             replicas and list them.
 END_USAGE
 }
 
diff --git a/t/sd-usage.t b/t/sd-usage.t
index c596ffe..abd1892 100644
--- a/t/sd-usage.t
+++ b/t/sd-usage.t
@@ -98,11 +98,15 @@ my @cmds = (
     },
     {
         cmd     => [ qw(clone -h) ],
-        error   => [ 'usage: sd-usage.t clone --from <url> [--non-interactive]',
+        error   => [ 'usage: sd-usage.t clone --from <url> [--as <alias>] [--non-interactive] | --local',
             '',
             'Options:',
             "    -n | --non-interactive - Don't prompt to specify email address for new",
             '                             database',
+            '    --as                   - Save an alias for this source, which can later be',
+            '                             used instead of the URL.',
+            '    --local                - Probe the local network for mDNS-advertised',
+            '                             replicas and list them.',
         ],
         comment => 'clone usage',
     },

commit 933ae5a5dd84fc324f4a430576fe2af22e0d81f8
Author: Christine Spang <spang at bestpractical.com>
Date:   Sat Jan 9 17:00:25 2010 -0500

    Three months later, I forgot what the hell this was for

diff --git a/lib/App/SD/CLI/Command/Clone.pm b/lib/App/SD/CLI/Command/Clone.pm
index 1fbc4ba..2b7246b 100644
--- a/lib/App/SD/CLI/Command/Clone.pm
+++ b/lib/App/SD/CLI/Command/Clone.pm
@@ -5,6 +5,7 @@ with 'App::SD::CLI::NewReplicaCommand';
 
 sub ARG_TRANSLATIONS {
     shift->SUPER::ARG_TRANSLATIONS(),
+    # this arg is used in the new_replica_wizard sub
     n => 'non-interactive',
 };
 
@@ -34,6 +35,9 @@ override run => sub {
 
     Prophet::CLI->end_pager();
 
+    # Prompt for SD setup (specifically email address for changes) after the
+    # clone, but *don't* immediately edit the database's settings, since a
+    # cloned database should have already been setup previously.
     $self->new_replica_wizard( edit_settings => 0 );
 };
 

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



More information about the Bps-public-commit mailing list