[Bps-public-commit] r14903 - in Prophet/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Thu Aug 7 16:39:57 EDT 2008
Author: sartak
Date: Thu Aug 7 16:39:55 2008
New Revision: 14903
Modified:
Prophet/trunk/ (props changed)
Prophet/trunk/lib/Prophet/ChangeSet.pm
Log:
r68951 at onn: sartak | 2008-08-07 16:38:32 -0400
ChangeSet->as_string
Modified: Prophet/trunk/lib/Prophet/ChangeSet.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/ChangeSet.pm (original)
+++ Prophet/trunk/lib/Prophet/ChangeSet.pm Thu Aug 7 16:39:55 2008
@@ -160,6 +160,34 @@
return $self;
}
+sub as_string {
+ my $self = shift;
+ my $out = '';
+
+ $out .= "Changeset "
+ . $self->original_sequence_no . '@' . $self->original_source_uuid
+ . "\n";
+
+ no warnings 'uninitialized'; # old changesets don't have creator
+ $out .= "by "
+ . $self->creator . '@' . $self->original_source_uuid
+ . " at " . $self->created . "\n";
+
+ for my $change ($self->changes) {
+ my @prop_changes = $change->prop_changes;
+ next if @prop_changes == 0;
+
+ for my $prop_change (@prop_changes) {
+ $out .= " " . $prop_change->summary . "\n";
+ }
+ $out .= "\n";
+ }
+
+ $out .= "\n";
+
+ return $out;
+}
+
__PACKAGE__->meta->make_immutable;
no Moose;
More information about the Bps-public-commit
mailing list