[Bps-public-commit] SD branch, master, updated. 0.73-60-gcf53960

? sunnavy sunnavy at bestpractical.com
Wed Apr 28 21:55:05 EDT 2010


The branch, master has been updated
       via  cf53960a8088887326bc822dc83769fa01aca3bf (commit)
      from  9eee276401ecd84f6f3b3e9a7638fbffb492a0da (commit)

Summary of changes:
 lib/App/SD/Replica/gcode/PullEncoder.pm |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit cf53960a8088887326bc822dc83769fa01aca3bf
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Apr 29 09:54:45 2010 +0800

    cc can have multiple values

diff --git a/lib/App/SD/Replica/gcode/PullEncoder.pm b/lib/App/SD/Replica/gcode/PullEncoder.pm
index 7176a57..5d46902 100644
--- a/lib/App/SD/Replica/gcode/PullEncoder.pm
+++ b/lib/App/SD/Replica/gcode/PullEncoder.pm
@@ -185,14 +185,17 @@ sub translate_ticket_state {
         if ( $updates->{cc} ) {
             my $value = delete $updates->{cc};
             my $is_delete;
-            if ( $value =~ /^-(.*)$/ ) {
-                $is_delete = 1;
-                $value     = $1;
-            }
+            my @cc = split /\s+/, $value;
+            for my $value (@cc) {
+                if ( $value =~ /^-(.*)$/ ) {
+                    $is_delete = 1;
+                    $value     = $1;
+                }
 
-            $earlier_state{ $PROP_MAP{cc} } =
-              $self->warp_list_to_old_value( $earlier_state{cc},
-                $is_delete ? ( undef, $value ) : ( $value, undef ) );
+                $earlier_state{ $PROP_MAP{cc} } =
+                  $self->warp_list_to_old_value( $earlier_state{cc},
+                    $is_delete ? ( undef, $value ) : ( $value, undef ) );
+            }
         }
 
         if ( $updates->{mergedinto} ) {

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list