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

sartak at bestpractical.com sartak at bestpractical.com
Sat Aug 9 12:43:26 EDT 2008


Author: sartak
Date: Sat Aug  9 12:43:26 2008
New Revision: 14944

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

Log:
 r69003 at onn:  sartak | 2008-08-09 12:43:17 -0400
 Use ChangeSet->as_string in the history command


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	Sat Aug  9 12:43:26 2008
@@ -11,28 +11,9 @@
 
     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";
-
-        no warnings 'uninitialized'; # old changesets don't have creator
-        print "by "
-            . $changeset->creator . '@' . $changeset->original_source_uuid
-            ." at " . $changeset->created . "\n";
-
-        for my $prop_change (@prop_changes) {
-            print "  ".$prop_change->summary, "\n";
-        }
-
-        print "\n";
+        print $changeset->as_string(change_filter => sub {
+            shift->record_uuid eq $record->uuid
+        });
     }
 }
 



More information about the Bps-public-commit mailing list