Development

Changeset 33412

You must first sign up to be able to contribute.

Changeset 33412

Show
Ignore:
Timestamp:
04/19/12 20:09:27 (1 year ago)
Author:
boutell
Message:

--gzip broke syncing 'to' rather than 'from', this fix is easier to maintain: $gzip and $gunzip are just the names of those utilities, or 'cat' if compression is not desired. Each pipeline can then use | consistently to suit its own purposes and get a consistent result

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfSyncContentPlugin/trunk/lib/task/synccontentTask.class.php

    r33405 r33412  
    9898    if ($this->setOptions['gzip']) 
    9999    { 
    100       $gzip = " | gzip "; 
    101       $gunzip = " | gunzip "; 
     100      $gzip = "gzip"; 
     101      $gunzip = "gunzip"; 
     102    } 
     103    else 
     104    { 
     105      $gzip = 'cat'; 
     106      $gunzip = 'cat'; 
    102107    } 
    103108 
     
    135140    if ($direction == 'to') 
    136141    { 
    137       $cmd = "$binary project:mysql-dump --application=$application --env=$env " . $gzip . " | " . $this->_content_sync_build_remote_cmd($pathRemote, " " . $gunzip . "| ./symfony project:mysql-load --application=$application --env=$envRemote"); 
     142      $cmd = "$binary project:mysql-dump --application=$application --env=$env | " . $gzip . " | " . $this->_content_sync_build_remote_cmd($pathRemote, $gunzip . " | ./symfony project:mysql-load --application=$application --env=$envRemote"); 
    138143      $this->_content_sync_system($cmd); 
    139144    } 
    140145    else 
    141146    { 
    142       $cmd = $this->_content_sync_build_remote_cmd($pathRemote, "./symfony project:mysql-dump --application=$application --env=$envRemote " . $gzip) . " " . $gunzip . " | $binary project:mysql-load --application=$application --env=$env"; 
     147      $cmd = $this->_content_sync_build_remote_cmd($pathRemote, "./symfony project:mysql-dump --application=$application --env=$envRemote | " . $gzip) . " | " . $gunzip . " | $binary project:mysql-load --application=$application --env=$env"; 
    143148      $this->_content_sync_system($cmd); 
    144149    }