[Bps-public-commit] SD - A distributed issue tracker branch, master, updated. 4654b5ca4ef34a806ad2421ad9338ec2b8828f45

spang at bestpractical.com spang at bestpractical.com
Tue Jan 27 05:53:37 EST 2009


The branch, master has been updated
       via  4654b5ca4ef34a806ad2421ad9338ec2b8828f45 (commit)
      from  bd82ff96ccc3c2d06a7bb6073202b4597c84d707 (commit)

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

- Log -----------------------------------------------------------------
commit 4654b5ca4ef34a806ad2421ad9338ec2b8828f45
Author: Christine Spang <spang at bestpractical.com>
Date:   Tue Jan 27 12:50:27 2009 +0200

    docs for prophet log

diff --git a/lib/App/SD/CLI/Command/Help/History.pm b/lib/App/SD/CLI/Command/Help/History.pm
new file mode 100644
index 0000000..8d60cd1
--- /dev/null
+++ b/lib/App/SD/CLI/Command/Help/History.pm
@@ -0,0 +1,51 @@
+package App::SD::CLI::Command::Help::History;
+use Moose;
+extends 'App::SD::CLI::Command::Help';
+
+sub run {
+    my $self = shift;
+    $self->print_header('Viewing Database History');
+    my $cmd = $self->_get_cmd_name;
+
+print <<EOF
+You can view a history of all changes to the database using the 'log'
+command. It can be run in the following ways:
+
+    $cmd log
+      Shows the last 20 changes.
+
+    $cmd log --all
+      Shows the entire history from start to end.
+
+    $cmd log <since>..<until>
+      Shows the range of history starting at <since> and ending at
+      <until>. Ranges can be specified using either sequence numbers
+      or an offset from the most recent change, designated by
+      LATEST~offset.
+
+Examples:
+
+    $cmd log 0..5
+      Shows changes 0 through 5.
+
+    $cmd log LATEST
+      Shows the most recent change.
+
+    $cmd LATEST~4
+      Shows changes from 4 before the most recent change up to the most
+      recent change.
+
+    $cmd 2..LATEST~5
+      Shows the second change up through 5 before the latest.
+
+    $cmd LATEST~10..LATEST~5
+      Shows changes from 10 before the latest to 5 before the latest.
+EOF
+
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
+1;
+
diff --git a/lib/App/SD/CLI/Dispatcher.pm b/lib/App/SD/CLI/Dispatcher.pm
index dc363a8..e70485d 100644
--- a/lib/App/SD/CLI/Dispatcher.pm
+++ b/lib/App/SD/CLI/Dispatcher.pm
@@ -25,6 +25,7 @@ under help => sub {
     on [ ['attachment', 'attachments'] ] => run_command('Help::Attachments');
     on [ ['comment', 'comments'] ]       => run_command('Help::Comments');
     on [ ['setting', 'settings'] ]       => run_command('Help::Settings');
+    on [ ['history', 'log'] ]            => run_command('Help::History');
 
     on [
         ['ticket', 'attachment', 'comment'],

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



More information about the Bps-public-commit mailing list