better error message for identical replacements
authorivan <ivan>
Fri, 2 Dec 2011 04:12:37 +0000 (04:12 +0000)
committerivan <ivan>
Fri, 2 Dec 2011 04:12:37 +0000 (04:12 +0000)
FS/FS/Record.pm

index 746cb59..caddc6f 100644 (file)
@@ -1182,7 +1182,9 @@ sub replace {
                    ? ($_, $new->getfield($_)) : () } $old->fields;
                    
   unless (keys(%diff) || $no_update_diff ) {
-    carp "[warning]$me $new -> replace $old: records identical"
+    carp "[warning]$me ". ref($new)."->replace ".
+           ( $primary_key ? "$primary_key ".$new->get($primary_key) : '' ).
+         ": records identical"
       unless $nowarn_identical;
     return '';
   }