[Bps-public-commit] r14776 - in Prophet/branches/creator: lib/Prophet
sartak at bestpractical.com
sartak at bestpractical.com
Mon Aug 4 21:13:05 EDT 2008
Author: sartak
Date: Mon Aug 4 21:13:03 2008
New Revision: 14776
Modified:
Prophet/branches/creator/lib/Prophet/ChangeSet.pm
Prophet/branches/creator/lib/Prophet/Conflict.pm
Prophet/branches/creator/t/simple-conflicting-merge.t
Log:
Fix creator/created for nullification changesets
Modified: Prophet/branches/creator/lib/Prophet/ChangeSet.pm
==============================================================================
--- Prophet/branches/creator/lib/Prophet/ChangeSet.pm (original)
+++ Prophet/branches/creator/lib/Prophet/ChangeSet.pm Mon Aug 4 21:13:03 2008
@@ -6,12 +6,12 @@
has creator => (
is => 'rw',
- isa => 'Str',
+ isa => 'Maybe[Str]',
);
has created => (
is => 'rw',
- isa => 'Str',
+ isa => 'Maybe[Str]',
default => sub {
my ($sec, $min, $hour, $day, $month, $year) = gmtime;
$year += 1900;
Modified: Prophet/branches/creator/lib/Prophet/Conflict.pm
==============================================================================
--- Prophet/branches/creator/lib/Prophet/Conflict.pm (original)
+++ Prophet/branches/creator/lib/Prophet/Conflict.pm Mon Aug 4 21:13:03 2008
@@ -210,8 +210,9 @@
sub generate_nullification_changeset {
my $self = shift;
my $nullification = Prophet::ChangeSet->new({
- creator => $self->prophet_handle->changeset_creator,
is_nullification => 1,
+ creator => undef,
+ created => undef,
});
for my $conflict ( @{ $self->conflicting_changes } ) {
Modified: Prophet/branches/creator/t/simple-conflicting-merge.t
==============================================================================
--- Prophet/branches/creator/t/simple-conflicting-merge.t (original)
+++ Prophet/branches/creator/t/simple-conflicting-merge.t Mon Aug 4 21:13:03 2008
@@ -114,6 +114,7 @@
$null_as_hash,
{
creator => undef,
+ created => undef,
is_nullification => 1,
is_resolution => undef,
original_sequence_no => undef,
@@ -139,7 +140,7 @@
my $applied_as_hash = $applied_null->as_hash;
# these aren't available yet in the memory-version
- $applied_as_hash->{$_} = undef for qw(sequence_no source_uuid original_source_uuid original_sequence_no);
+ $applied_as_hash->{$_} = undef for qw(sequence_no source_uuid original_source_uuid original_sequence_no created);
is_deeply( $applied_as_hash, $null_as_hash );
@@ -148,11 +149,12 @@
my $from_alice_as_hash = $from_alice->as_hash;
- $from_alice_as_hash->{$_} = undef for qw(sequence_no source_uuid);
+ $from_alice_as_hash->{$_} = undef for qw(sequence_no source_uuid created);
is_deeply(
$from_alice_as_hash,
{
creator => 'alice',
+ created => undef,
is_nullification => undef,
is_resolution => undef,
source_uuid => undef,
More information about the Bps-public-commit
mailing list