[Bps-public-commit] r14637 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Wed Jul 30 11:46:32 EDT 2008


Author: sartak
Date: Wed Jul 30 11:46:31 2008
New Revision: 14637

Added:
   Prophet/trunk/lib/Prophet/CLI/Command/History.pm
Modified:
   Prophet/trunk/   (props changed)

Log:
 r68007 at onn:  sartak | 2008-07-30 11:44:18 -0400
 Add a "history" command


Added: Prophet/trunk/lib/Prophet/CLI/Command/History.pm
==============================================================================
--- (empty file)
+++ Prophet/trunk/lib/Prophet/CLI/Command/History.pm	Wed Jul 30 11:46:31 2008
@@ -0,0 +1,29 @@
+package Prophet::CLI::Command::History;
+use Moose;
+extends 'Prophet::CLI::Command';
+with 'Prophet::CLI::RecordCommand';
+
+sub run {
+    my $self = shift;
+
+    my $record = $self->_load_record;
+    print "History for record " . $record->luid . " (" . $record->uuid . ")\n";
+    for my $change ($record->changes) {
+        my @prop_changes = $change->prop_changes;
+        next if @prop_changes == 0;
+
+        # separate each changeset
+        print "\n";
+
+        for my $prop_change (@prop_changes) {
+            print $prop_change->summary, "\n";
+        }
+    }
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
+1;
+
+



More information about the Bps-public-commit mailing list