[Bps-public-commit] r14746 - Prophet/trunk/lib/Prophet/CLI/Command

jesse at bestpractical.com jesse at bestpractical.com
Mon Aug 4 01:58:04 EDT 2008


Author: jesse
Date: Mon Aug  4 01:58:03 2008
New Revision: 14746

Modified:
   Prophet/trunk/lib/Prophet/CLI/Command/History.pm

Log:
* Some early tweaks to improve how history is displayed

Modified: Prophet/trunk/lib/Prophet/CLI/Command/History.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/History.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/History.pm	Mon Aug  4 01:58:03 2008
@@ -7,16 +7,23 @@
     my $self = shift;
 
     my $record = $self->_load_record;
-    print "History for record " . $record->luid . " (" . $record->uuid . ")\n";
-    for my $change ($record->changes) {
+    print "History for record " . $record->luid . " (" . $record->uuid . ")\n\n";
+    for my $changeset ($record->changesets) {
+        my @changes = grep { $_->record_uuid eq $record->uuid }
+                     $changeset->changes;
+
+        my $change = shift @changes;
+        warn "We seem to have multiple changes for a single record for changeset ".$changeset->original_sequence_no .'@'.$changeset->original_source_uuid."\n" if ($changes[0]);
+
         my @prop_changes = $change->prop_changes;
         next if @prop_changes == 0;
 
         # separate each changeset
+        print "Changeset ".$changeset->original_sequence_no .'@'.$changeset->original_source_uuid."\n";
         print "\n";
 
         for my $prop_change (@prop_changes) {
-            print $prop_change->summary, "\n";
+            print "  ".$prop_change->summary, "\n";
         }
     }
 }



More information about the Bps-public-commit mailing list