If you have the following definition in sites/default/drushrc.php:

$options['command-specific']['rsync'] = array(
  'delete' => true,
$options['target-command-specific']['rsync'] = array(
  'delete' => true,
);

Then --delete will be added to your rsync options if your site is bootstrapped (e.g., if running drush rsync from your sites directory, but will not be added if the site is merely referenced in the rsync command (e.g. drush rsync path @site).

The patch allows the command-specific options to be applied uniformly in both scenarios. (See below for patch.)

Update: 'command-specific' is used when the site is bootstrapped, 'source-command-specific' is used when the site is referenced in the source parameter of rsync, and 'target-command-specific' is used when the site is referenced in the target parameter of rsync. This is consistent with what is done today for command-specific options in an alias record.

Comments

greg.1.anderson’s picture

Here's the patch.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

THis is on the edge of comprehensibility for our users. You think it fixes a bug so in it goes. Feel free to commit with or without a test.

greg.1.anderson’s picture

sql-sync already works like this. Committed.

greg.1.anderson’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.