[Bps-public-commit] r15187 - Prophet/trunk/lib/Prophet

jesse at bestpractical.com jesse at bestpractical.com
Fri Aug 15 11:41:09 EDT 2008


Author: jesse
Date: Fri Aug 15 11:41:08 2008
New Revision: 15187

Modified:
   Prophet/trunk/lib/Prophet/Conflict.pm

Log:
* Clean up the conflict detection to understand that empty value are empty values

Modified: Prophet/trunk/lib/Prophet/Conflict.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Conflict.pm	(original)
+++ Prophet/trunk/lib/Prophet/Conflict.pm	Fri Aug 15 11:41:08 2008
@@ -184,8 +184,10 @@
             source_new_value => $prop_change->new_value
         };
 
-        if (   !exists $current_state->{ $prop_change->name }
-            || !defined $prop_change->old_value
+        my $old_exists = defined $prop_change->old_value && $prop_change->old_value ne '';
+
+        if ( 
+               ((exists $current_state->{ $prop_change->name }) != $old_exists)
             || ( $current_state->{ $prop_change->name } ne $prop_change->old_value ) )
         {
             push @prop_conflicts, Prophet::ConflictingPropChange->new($s);



More information about the Bps-public-commit mailing list