This patch changes the canonical site alias from this:

$options['site-aliases']['greenknowe.org'] = array (
  'path-aliases' => 
  array (
    '!root' => '/srv/www/drupal',
  ),
  'uri' => 'http://greenknowe.org',
);

To this:

$options['site-aliases']['greenknowe.org'] = array (
  'root' => '/srv/www/drupal',
  'uri' => 'http://greenknowe.org',
);

The motivation for this came from reworking the drush documentation to include an overview of site aliases (in progress). I wanted canonical aliases to be simpler. Currently, the two attributes that identify a Drupal site (on a given machine) are the Drupal root and the site uri, passed to drush via -r and -l (or --root and --uri), respectively. It makes sense that the canonical alias should mirror the command line site specification closely. This will make simple aliases to local sites easier for new users to set up.

An important thing to note about this patch is that site aliases that define the drupal root in the '!root' item of the path aliases are still valid and will still work. Conversely, it is also still possible to reference the Drupal root defined in the 'root' item of the site alias via aliasname:!root/path in drush rsync. (n.b. this is usually not necessary; since relative paths used in drush rsync are taken from the Drupal root, the preceding path is equivalent to aliasname:path.)

This patch therefore should be code-compatible with all of the previous drush site alias code, and relatively low-risk to apply.

CommentFileSizeAuthor
drush-canonical-aliases.patch6.44 KBgreg.1.anderson

Comments

moshe weitzman’s picture

Status: Needs review » Fixed

Committed. good move.

Status: Fixed » Closed (fixed)

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