[Bps-public-commit] SD branch, master, updated. 0.74-64-g4349217

Christine Spang spang at bestpractical.com
Mon Jan 3 14:49:49 EST 2011


The branch, master has been updated
       via  434921703f9484f6b61a389f45559eaeb133efff (commit)
      from  41ad4b9950961aca75b74a3799e5f8c7867d3516 (commit)

Summary of changes:
 lib/App/SD/CLI/Command/Help/Commands.pm |   62 +++++++++++++++++++++++++++++++
 lib/App/SD/CLI/Dispatcher.pm            |    1 +
 2 files changed, 63 insertions(+), 0 deletions(-)
 create mode 100644 lib/App/SD/CLI/Command/Help/Commands.pm

- Log -----------------------------------------------------------------
commit 434921703f9484f6b61a389f45559eaeb133efff
Author: Christine Spang <christine at debian.org>
Date:   Mon Jan 3 19:49:14 2011 +0000

    add 'help commands'
    
    Closes RT #54133, reported by mschwern at cpan.org

diff --git a/lib/App/SD/CLI/Command/Help/Commands.pm b/lib/App/SD/CLI/Command/Help/Commands.pm
new file mode 100644
index 0000000..610be24
--- /dev/null
+++ b/lib/App/SD/CLI/Command/Help/Commands.pm
@@ -0,0 +1,62 @@
+package App::SD::CLI::Command::Help::Commands;
+use Any::Moose;
+extends 'App::SD::CLI::Command::Help';
+
+sub run {
+    my $self = shift;
+    $self->print_header('Summary of SD commands');
+    my ${cmd}= $self->cli->get_script_name;
+
+print <<EOF
+
+The commonly used SD commands are:
+
+    help      view built-in documentation
+    init      initialise a new replica
+    clone     clone an existing local or remote replica
+    publish   publish a replica so others can pull from / clone it
+    pull      pull in new changesets from another replica
+    push      push changesets to a foreign replica
+    server    run a local web interface
+    browser   run a local web interface and open it up in a browser
+    log       view changesets
+    shell     spawn an interactive shell
+    version   view version information
+    config    view and modify configuration
+    aliases   view and modify aliases
+    settings  manage replica-specific settings
+
+  For operating on tickets:
+
+    create (new)    make a new ticket
+    search (list)   list tickets matching criteria
+    show (basics)   show basic info about a ticket
+    details         show detailed info about a ticket
+    comment         create a new comment on a ticket
+    comments        show all comments belonging to a ticket
+    update (edit)   change info about a ticket
+    delete (rm)     delete a ticket
+
+  For operating on ticket comments:
+
+    create (new)    make a new ticket comment
+    update (edit)   change info about a ticket comment
+    delete (rm)     delete a ticket comment
+
+  For operating on ticket attachments:
+
+    create (new)    make a new ticket attachment
+    content         display an attachment
+    delete (rm)     delete a ticket attachment
+
+Commands that operate on a record must be run with the record
+type specified. See the examples given in specific help documents.
+EOF
+
+}
+
+__PACKAGE__->meta->make_immutable;
+no Any::Moose;
+
+1;
+
diff --git a/lib/App/SD/CLI/Dispatcher.pm b/lib/App/SD/CLI/Dispatcher.pm
index cab36d4..9bcc2f2 100644
--- a/lib/App/SD/CLI/Dispatcher.pm
+++ b/lib/App/SD/CLI/Dispatcher.pm
@@ -36,6 +36,7 @@ under help => sub {
     on about   => run_command('Help::About');
     on config  => run_command('Help::Config');
     on copying => run_command('Help::Copying');
+    on commands => run_command('Help::Commands');
     on [ ['summary-format', 'ticket.summary-format', 'ticket_summary_format'] ]
         => run_command('Help::ticket_summary_format');
 

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



More information about the Bps-public-commit mailing list