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

sartak at bestpractical.com sartak at bestpractical.com
Thu Jul 24 02:04:17 EDT 2008


Author: sartak
Date: Thu Jul 24 02:04:13 2008
New Revision: 14462

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/Resolver/Prompt.pm

Log:
 r64989 at onn:  sartak | 2008-07-24 02:04:07 -0400
 In a conflict, display (undefined) instead of the empty string and an undef warning


Modified: Prophet/trunk/lib/Prophet/Resolver/Prompt.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Resolver/Prompt.pm	(original)
+++ Prophet/trunk/lib/Prophet/Resolver/Prompt.pm	Thu Jul 24 02:04:13 2008
@@ -14,9 +14,18 @@
     for my $prop_conflict ( @{ $conflicting_change->prop_conflicts } ) {
 
         print $prop_conflict->name . ": \n";
-        print "(T)ARGET     " . $prop_conflict->target_value . "\n";
-        print "SOURCE (O)LD " . $prop_conflict->source_old_value . "\n";
-        print "SOURCE (N)EW " . $prop_conflict->source_new_value . "\n";
+
+        my %values;
+        for (qw/target_value source_old_value source_new_value/) {
+            $values{$_} = $prop_conflict->$_;
+            $values{$_} = "(undefined)"
+                if !defined($values{$_});
+        }
+
+
+        print "(T)ARGET     $values{target_value}\n";
+        print "SOURCE (O)LD $values{source_old_value}\n";
+        print "SOURCE (N)EW $values{source_new_value}\n";
 
         while ( my $choice = lc( substr( <STDIN> || 'T', 0, 1 ) ) ) {
 



More information about the Bps-public-commit mailing list