diff -x .git -rNup export/DRUPAL-6--1/drush.inc working/DRUPAL-6--1/drush.inc
--- export/DRUPAL-6--1/drush.inc	2008-05-19 03:31:57.000000000 +0200
+++ working/DRUPAL-6--1/drush.inc	2008-11-23 02:19:19.000000000 +0100
@@ -6,6 +6,9 @@
  * The drush API implementation and helpers.
  */
 
+// Load the drush module engine.
+require_once(dirname(__FILE__) . '/module.inc');
+
 /**
  * Dispatch a given set of commands.
  * Modules can add commands by implementing hook_drush_command().
@@ -40,6 +43,19 @@ function drush_dispatch($commands) {
 }
 
 /**
+ * This is called if no command or an unknown command is entered.
+ */
+function drush_usage() {
+  $commands = func_get_args();
+
+  if (drush_get_option('help') || empty($commands)) {
+    return drush_callback_help();
+  }
+
+  return drush_error(t('Invalid command !command.', array('!command' => implode(" ", $commands))));
+}
+
+/**
  * Get a list of all implemented commands.
  * This invokes hook_drush_command().
  */
@@ -50,7 +66,7 @@ function drush_get_commands($refresh = F
     return $commands;
   }
 
-  $commands = module_invoke_all('drush_command', TRUE);
+  $commands = drush_module_invoke_all('drush_command', TRUE);
 
   return $commands;
 }
@@ -274,3 +290,4 @@ function _drush_get_table_column_widths(
   }
   return $widths;
 }
+
diff -x .git -rNup export/DRUPAL-6--1/drush.module working/DRUPAL-6--1/drush.module
--- export/DRUPAL-6--1/drush.module	2008-02-01 22:56:08.000000000 +0100
+++ working/DRUPAL-6--1/drush.module	2008-11-23 02:19:19.000000000 +0100
@@ -4,134 +4,7 @@
 /**
  * @file
  * drush (the drupal shell) provides a command line interface for Drupal.
- */
-
-
-/**
- * Implementation of hook_help()
- */
-function drush_help($section) {
-  switch ($section) {
-    case 'admin/help#drush':
-      include_once('drush.inc');
-      
-      $output .= t('<p>Drush is a command line shell and Unix scripting interface for Drupal, a
-      veritable Swiss Army knife designed to make life easier for those of us who
-      spend most of our working hours hacking away at the command prompt.</p>');
-
-      // Usage
-      $output .= '<a name=\'usage\'><h3>' . t('Usage') . '</h3></a>';
-      $output .= '<p><code>drush.php [options] &lt;command&gt; &lt;command&gt; ...</code></p>';
-      
-      // Options
-      $output .= '<a name=\'options\'><h3>' . t('Options') . '</h3></a>';
-      $options = drush_get_options();
-      $output .= "<dl>";
-      foreach ($options as $option => $description) {
-        $output .= '<dt>' . "<code>$option</code>" . '</dt>';
-        $output .= '<dd>' .  $description . '</dd>';
-      }
-      $output .= "</dl>";
-            
-      // Commands
-      $commands = drush_get_commands();
-      $output .= '<a name=\'commands\'><h3>' . t('Commands') . '</h3></a>';
-      $output .= "<dl>";
-      foreach ($commands as $command => $info) {
-        $output .= '<dt>' . "<code>drush.php $command</code>" . '</dt>';
-        $output .= '<dd>' .  $info["description"] . '</dd>';
-      }
-      $output .= "</dl>";
-      
-      return $output;
-    
-  }
-}
-
-
-/**
- * Implementation of hook_drush_command().
- */
-function drush_drush_command() {
-  $items['help'] = array(
-    'callback' => 'drush_callback_help',
-    'description' => 'View help. Run "drush help [command]" to view command-specific help.'
-  );
-  return $items;
-}
-
-/**
- * Get the available options for Drush.
  *
- * @return
- *    An associative array containing the option definition as the key, and the description as the value,
- *    for each of the available options.
- */
-function drush_get_options() {
-  // TODO: Add a hook for this, to allow other modules to add their options
-  $options['-r <path>, --root=<path>'] = t("Drupal root directory to use (default: current directory)");
-  $options['-l <uri> , --uri=<uri>']   = t('URI of the drupal site to use (only needed in multisite environments)');
-  $options['-v, --verbose']            = t('Display all available output');
-  $options['-y, --yes']                = t("Assume 'yes' as answer to all prompts");
-  $options['-s, --simulate']           = t("Simulate all relevant actions (don't actually change the system)");
-  $options['-c, --config']             = t("Specify a config file to use. See example.drushrc.php");
-  return $options;
-}
-
-/**
- * Command callback. Display help.
- */
-function drush_callback_help() {
-  $commands = func_get_args();
-
-  // Display general help text if no command is specified.
-  if (empty($commands)) {
-    drush_print(t('Usage: drush.php [options] <command> <command> ...'));
-    drush_print();
-    drush_print(t('Options: '));
-    foreach (drush_get_options() as $option => $description) {
-      $rows[] = array($option, $description);
-    }
-
-    drush_print_table($rows, 2);
-    drush_print();
-    drush_print('Commands: ');
-
-    $commands = drush_get_commands();
-    $rows = array();
-    foreach($commands as $key => $command) {
-      $rows[] = array($key, $commands[$key]['description']);
-    }
-    drush_print_table($rows, 2);
-  }
-  // Print command specific help.
-  else {
-    $commandstring = implode(" ", $commands);
-
-    if (!drush_is_command($commandstring)) {
-      return drush_error(t('Invalid command !command.', array('!command' => implode(" ", $commands))));
-    }
-
-    $help = module_invoke_all('help', 'drush:'. $commandstring);
-    if (!empty($help)) {
-      drush_print(implode("\n", $help));
-    }
-    else {
-      drush_print(t("No help available for command 'drush $commandstring'."));
-    }
-  }
-}
-
-/**
- * This is called if no command or an unknown command is entered.
+ * This file is deprecated.
+ *
  */
-function drush_usage() {
-  $commands = func_get_args();
-
-  if (drush_get_option('help') || empty($commands)) {
-    return drush_callback_help();
-  }
-
-  return drush_error(t('Invalid command !command.', array('!command' => implode(" ", $commands))));
-
-}
\ No newline at end of file
diff -x .git -rNup export/DRUPAL-6--1/drush.php working/DRUPAL-6--1/drush.php
--- export/DRUPAL-6--1/drush.php	2008-11-18 02:07:49.000000000 +0100
+++ working/DRUPAL-6--1/drush.php	2008-11-23 16:37:39.000000000 +0100
@@ -1,6 +1,5 @@
 #!/usr/bin/env php
 <?php
-
 // $Id: drush.php,v 1.24.2.3 2008/11/18 01:07:49 grugnog Exp $
 
 /**
@@ -27,43 +26,44 @@ exit(drush_bootstrap($GLOBALS['argc'], $
  * access to.
  *
  * @return
- *   A boolean value that is true when PHP is being run through the command line, 
+ *   A boolean value that is true when PHP is being run through the command line,
  *   and false if being run through cgi or mod_php.
  */
 function drush_verify_cli() {
   if (php_sapi_name() == 'cgi') {
     return (is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0);
   }
-  
+
   return (php_sapi_name() == 'cli');
 }
 
 /**
  * Load drushrc files (if available) from several possible locations.
- * 
+ *
  * @param $root
- *   The Drupal root to check. 
+ *   The Drupal root to check.
  */
 function drush_load_rc($root) {
   global $override, $args;
-  
-  # Specified rc file
+
+  // Specified rc file
   $configs[] = drush_get_option(array('c', 'config'), FALSE);
-  # Rc file in same directory as the drush.php file
+  // Rc file in same directory as the drush.php file
   $configs[] = dirname($_SERVER['SCRIPT_FILENAME']) . "/drushrc.php";
-  # Rc file in current directory
-  $configs[] = "drushrc.php";  
-  # Rc file in located drupal root
-  $configs[] = drush_get_option(array('r', 'root'), $root). '/drushrc.php'; 
-  # Rc file in user's home directory
+  // Rc file in current directory
+  $configs[] = "drushrc.php";
+  // Rc file in located drupal root
+  $configs[] = drush_get_option(array('r', 'root'), $root). '/drushrc.php';
+  // Rc file in user's home directory
   $configs[] = $_SERVER['HOME'] . '/.drushrc.php';
-  
+
   foreach ($configs as $config) {
     if (file_exists($config)) {
       define('DRUSH_CONFIG', $config);
       require_once($config);
       if (is_array($options)) {
-        $args['options'] = array_merge($args['options'], $options); # Sets all the default options for drush
+        // Sets all the default options for drush
+        $args['options'] = array_merge($args['options'], $options);
       }
       break;
     }
@@ -75,9 +75,9 @@ function drush_bootstrap($argc, $argv) {
 
   // Parse command line options and arguments.
   $args = drush_parse_args($argv, array('h', 'u', 'r', 'l'));
-  
+
   // We use PWD if available because getcwd() resolves symlinks, which
-  // could take us outside of the Drupal root, making it impossible to find. 
+  // could take us outside of the Drupal root, making it impossible to find.
   $path = $_SERVER['PWD'];
   if (empty($path)) {
     $path = getcwd();
@@ -91,7 +91,7 @@ function drush_bootstrap($argc, $argv) {
 
   // Load .drushrc file if available. Allows you to provide defaults for options and variables.
   drush_load_rc($root);
-  
+
   $uri = FALSE;
   // If the current directory contains a settings.php we assume that is the desired site URI.
   if (file_exists('./settings.php')) {
@@ -169,7 +169,7 @@ function drush_bootstrap($argc, $argv) {
   if (is_array($override)) {
     $conf = array_merge($conf, $override);
   }
-    
+
   // Login the specified user (if given).
   if (DRUSH_USER) {
     _drush_login(DRUSH_USER);
@@ -197,7 +197,7 @@ function drush_bootstrap($argc, $argv) {
 /**
  * Exhaustive depth-first search to try and locate the Drupal root directory.
  * This makes it possible to run drush from a subdirectory of the drupal root.
- * 
+ *
  * @param $path
  *   The path the start the search from.
  */
@@ -243,16 +243,7 @@ function _drush_bootstrap_drupal() {
   // The bootstrap can fail silently, so we catch that in a shutdown function.
   register_shutdown_function('drush_shutdown');
   drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
-  if (module_exists('drush')) {
-    require_once drupal_get_path('module', 'drush') . '/drush.inc';
-  }
-  else {
-    $message = "E: You must enable the Drush module for the site you want to use.\n";
-    $message .= "Hint: Drush was looking in the site '$conf_path'. You can select another site\n";
-    $message .= "with Drush enabled by specifying the Drupal URI to use with the --uri\n";
-    $message .= "parameter on the command line or \$options['uri'] in your drushrc.php file.\n";
-    die($message);
-  }
+  require_once dirname(__FILE__) . '/drush.inc';
 }
 
 function drush_shutdown() {
diff -x .git -rNup export/DRUPAL-6--1/drush_pm/drush_pm.info working/DRUPAL-6--1/drush_pm/drush_pm.info
--- export/DRUPAL-6--1/drush_pm/drush_pm.info	2008-08-11 02:36:25.000000000 +0200
+++ working/DRUPAL-6--1/drush_pm/drush_pm.info	1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-; $Id: drush_pm.info,v 1.5.2.1 2008/08/11 00:36:25 weitzman Exp $
-name = Drush package manager
-description = Allows you to install and update modules from the command line.
-package = Drush
-dependencies[] = update
-dependencies[] = drush
-core = 6.x
diff -x .git -rNup export/DRUPAL-6--1/drush_pm/drush_pm.module working/DRUPAL-6--1/drush_pm/drush_pm.module
--- export/DRUPAL-6--1/drush_pm/drush_pm.module	2008-11-15 04:37:32.000000000 +0100
+++ working/DRUPAL-6--1/drush_pm/drush_pm.module	1970-01-01 01:00:00.000000000 +0100
@@ -1,612 +0,0 @@
-<?php
-// $Id: drush_pm.module,v 1.25.2.4 2008/11/15 03:37:32 weitzman Exp $
-
-/**
- * @file
- *  The drush Package Manager
- * 
- * Terminology:
- * - Request: a requested package (string or keyed array), with a project name and (optionally) version. 
- * - Project: a drupal.org project, such as cck or drush.
- * - Version: a requested version, such as 1.0 or 1.x-dev.
- * - Release: a specific release of a project, with associated metadata (from the drupal.org update service).
- * - Package: the collection of files that make up a release.
- */
-
-/**
- * Project is a user requested version update.
- */
-define('DRUSH_PM_REQUESTED_UPDATE', 101);
-
-/**
- * User requested version already installed.
- */
-define('DRUSH_PM_REQUESTED_CURRENT', 102);
-
-/**
- * Implementation of hook_help().
- */
-function drush_pm_help($section) {
-  $handlers = str_replace('drush_pm_', '', module_invoke_all('drush_pm_package_handler'));
-  if ($handlers) {
-    $handlers[0] = $handlers[0] .' (default)'; 
-    $handler = '--handler - specify which package handler you would like to use.
-  Available options: '. implode(', ', $handlers) . "\n";
-  }
-  else {
-    $handler = "ERROR: You must activate a drush Package Manager handler module in order
-     to install or update packages.";
-  }
-  
-  switch ($section) {
-    case 'drush:pm install':
-      return t("Usage: drush [options] pm install <package_1> <package_2> ...
-<package_n> is the short name of a project hosted on drupal.org,
-or the short name and the version number (Drupal major version is optional).
-e.g. project, project-5.x-1.0, project-1.0, project-1.x-dev, project-1.1-rc1
-So far, only modules are supported.\n
-The modules will be installed into a site specific modules directory if one
-exists, otherwise sites/all/modules is used.
-After installing, you still have to activate on the normal module
-administration page\n\n". $handler);
-      
-    case 'drush:pm update':
-      return t("Usage: drush [options] pm update\n
-Displays update status information and allows to update all installed packages
-to the latest recommended version (so far, only modules are supported).
-If you only want to update certain projects, pass those as additional
-arguments (e.g. cck devel views ...).
-Note: The user is asked to confirm before the actual update is started.
-Use the -y option to answer all questions with yes automatically.\n\n". $handler);
-    
-  case 'drush:pm info':
-    return t("Usage: drush [options] pm info <package_1> <package_2> ...\n
-View all releases for a given project. Useful for deciding which version to install/update. 
-    ");
-  }
-}
-
-/**
- * Implementation of hook_drush_command().
- */
-function drush_pm_drush_command() {
-  $items['pm install'] = array(
-    'callback' => 'drush_pm_install',
-    'description' => 'Install one or more modules'
-  );
-  $items['pm refresh'] = array(
-    'callback' => 'drush_pm_refresh',
-    'description' => 'Refresh update status information'
-  );
-  $items['pm update'] = array(
-    'callback' => 'drush_pm_update',
-    'description' => 'Update your modules'
-  );
-  $items['pm info'] = array(
-    'callback' => 'drush_pm_info',
-    'description' => 'Release information for a module'
-  );
-  return $items;
-}
-
-function drush_pm_requirements($phase) {
-  switch ($phase) {
-    case 'runtime':
-    $package_handlers = module_invoke_all('drush_pm_package_handler');
-      $requirements['handlers'] = array(
-        'title' => t('Drush: Package handler'),
-        'description' => t('In order to use the Drush package manager module to install/update projects, you must install one of its package handler modules.'),
-        'severity' => empty($package_handlers) ? REQUIREMENT_ERROR : REQUIREMENT_OK,
-      );
-      break;
-  }
-  return is_array($requirements) ? $requirements : array();
-}
-
-/**
- * Parse out the project name and version and return as a structured array
- *
- * @param $requests an array of project names
- */
-function drush_pm_parse_project_version($requests) {
-  $requestdata = array();
-  foreach($requests as $request) {
-    // project-HEAD or project-5.x-1.0-beta
-    // '5.x-' is optional, as is '-beta'
-    preg_match('/-(HEAD|(\d+)\.([\dx]+)(-.+)?)$/', $request, $matches);
-    if ($matches[0]) {
-      // Specific version requested
-      $version = $matches[0];
-      $project = substr($request, 0, strlen($request) - strlen($version));
-    }
-    else {
-      // Recommended stable version requested
-      $project = $request;
-    }
-    if (empty($project)) {
-      drush_die(t("Project name not found.\n\nRun drush help pm install for more information."));
-    }
-    $requestdata[$project] = array(
-      'name' => $project,
-      'version' => trim($version, ' -'),
-    );
-  }
-  return $requestdata;
-}
-
-/**
- * Command callback. Installs one or more packages (so far only modules).
- */
-function drush_pm_install() {
-  $requests = func_get_args();
-  if (empty($requests)) {
-    drush_die(t("No project specified.\n\nRun drush help pm install for more information."));
-  }
-  
-  // Parse out project name and version
-  $requests = drush_pm_parse_project_version($requests);
-  
-  // If a URI is provided then we install to that specific site, otherwise we install to sites/all/modules
-  if (DRUSH_URI) {
-    $path = conf_path();
-    $modulepath = DRUSH_DRUPAL_ROOT .'/'. $path .'/modules/';
-  }
-  
-  if (!isset($modulepath) || !file_exists($modulepath)) {
-    $modulepath = DRUSH_DRUPAL_ROOT .'/sites/all/modules/';
-  }
-
-  // Get the module info from drupal.org via xml-rpc
-  $releases = drush_pm_get_project_info($requests);
-  if (!$releases) {
-    drush_die(t("None of the given projects exists or has releases that are compatible with your Drupal version."));
-  }
-  
-  $startdir = getcwd();
-
-  $package_handler = drush_pm_get_package_handler() .'_install_project';
-  if (!function_exists($package_handler)) {
-  	drush_die(t("The $package_handler package handler does not handle installs."));
-  }
-
-  // Download and install each module
-  foreach($requests as $project => $request) {
-    if (isset($releases[$project]) && $release = drush_pm_get_release($request, $releases[$project])) {
-      if (is_dir($modulepath . $project)) {
-        drush_error(t('Project !project is already installed. Skipping.', array('!project' => $project)));
-      }
-      elseif ($package_handler($project, $release, $modulepath)) {
-        drush_print(t("Project !project successfully installed (version !version).",
-          array('!project' => $project, '!version' => $release['version'])));
-        module_invoke_all('drush_pm_post_install', $project, $release, $modulepath);
-      }
-    }
-    else {
-      drush_error(t('Project !project doesn\' exist or has no releases that are compatible with your Drupal version. Skipping.', array('!project' => $project)));
-    }
-  }
-
-  drush_op('chdir', $startdir);
-}
-
-/**
- * Command callback. Displays update status info and allows to update installed modules.
- * Pass specific projects as arguments, otherwise we update all that have candidate releases.
- *
- * This command prompts for confirmation before updating, so it is safe to run just to check on 
- * In this case, say at the confirmation prompt.
- */
-function drush_pm_update() {  
-  // Get update status information.
-  $releases = _drush_pm_get_update_info();
-
-  // Get specific requests
-  $requests = func_get_args();
-  
-  // Parse out project name and version
-  $requests = drush_pm_parse_project_version($requests);
-
-  // Preprocess releases
-  if (!empty($requests)) {
-    // Force update projects where a specific version is reqested
-    foreach ($requests as $project => $request) {
-      if (!empty($request['version'])) {
-        // Match the requested release
-        $release = drush_pm_get_release($request, $releases[$project]);
-        if ($release['version'] == $releases[$project]['existing_version']) {
-          $releases[$project]['status'] = DRUSH_PM_REQUESTED_CURRENT;          
-        }
-        else {
-          $releases[$project]['status'] = DRUSH_PM_REQUESTED_UPDATE;
-        }
-        // Set the candidate version to the requested release
-        $releases[$project]['candidate_version'] = $release['version'];
-      }
-    }
-  }
-
-  // Table headers.
-  $rows[] = array(t('Name'), t('Installed version'), t('Recommended version'), t('Status'));
-
-  // Process releases, notifying user of status and building a list of proposed updates
-  $updateable = array();
-  foreach ($releases as $release) {
-    if (!$release['title']) {
-      continue;
-    }
-
-    switch($release['status']) {
-      case UPDATE_CURRENT:
-        $status = t('Up to date');
-        $release['candidate_version'] = $release['recommended'];
-        break;
-      case UPDATE_NOT_CURRENT:
-        $status = t('Update available');
-        $release['candidate_version'] = $release['recommended'];
-        $updateable[$release['name']] = $release;
-        break;
-      case UPDATE_NOT_SECURE:
-        $status = t('SECURITY UPDATE available');
-        $release['candidate_version'] = $release['recommended'];
-        $updateable[$release['name']] = $release;
-        break;
-      case UPDATE_REVOKED:
-        $status = t('Intalled version REVOKED');
-        $release['candidate_version'] = $release['recommended'];
-        $updateable[$project['name']] = $release;
-        break;
-      case DRUSH_PM_REQUESTED_UPDATE:
-        $status = t('Specified version available');
-        $updateable[$release['name']] = $release;
-        break;
-      case DRUSH_PM_REQUESTED_CURRENT:
-        $status = t('Specified version already installed');
-        break;
-      case UPDATE_NOT_SUPPORTED:
-        $status = t('Installed version not supported');
-        $release['candidate_version'] = $release['recommended'];
-        $updateable[$project['name']] = $release;
-        break;
-      case UPDATE_NOT_CHECKED:
-        $status = t('Unable to check status');
-        break;
-      case UPDATE_UNKNOWN:
-      default:
-        $status = t('Unknown');
-        break;
-    }
-
-    $rows[] = array($release['title'], $release['existing_version'], $release['candidate_version'], $status);
-  }
-
-  $last = variable_get('update_last_check', 0);
-  drush_print(t('Update information last refreshed: ') . ($last  ? format_date($last) : t('Never')));
-  drush_print();
-  drush_print(t("Update status information on all installed and enabled Drupal modules:"));
-  drush_print_table($rows, 2, TRUE);
-  drush_print();
-
-  // If specific project updates were requested then remove releases for all others
-  if (!empty($requests)) {
-    foreach ($updateable as $project => $release) {
-      if (!isset($requests[$project])) {
-        unset($updateable[$project]);
-      }
-    }
-  }
-
-  if (empty($updateable)) {
-    drush_die(t('No updates available.'));
-  }
-
-  // Offer to update to the identified releases
-  drush_pm_update_packages($updateable);
-}
-
-/**
- * Update packages according to an array of releases, following interactive
- * confirmation from the user.
- * 
- * @param $releases
- *   An array of releases from the drupal.org update service, with an additional
- *   array key candidate_version that specifies the version to be installed.
- */
-function drush_pm_update_packages($releases) {
-  if (isset($releases['drupal'])) {
-    drush_print("NOTE: An update for the Drupal core is available. \nDrupal itself can't yet be updated by this tool. Please update Drupal manually.\n");
-    unset($releases['drupal']);
-  }
-
-  drush_print(t('Updates will be made to the following projects:'));
-  foreach($releases as $release) {
-    $print .= $release['title'] . " [" . $release['name'] . '-' . $release['candidate_version'] . "], ";
-  }
-  drush_print(substr($print, 0, strlen($print)-2));
-  drush_print();
-  drush_print(t("Note: Updated modules can potentially break your site. It's not recommended to update production sites without prior testing."));
-  if (module_exists('drush_pm_svn')) {
-    drush_print(t("Note: A backup of your package will be stored to backups directory if no .svn directory is found."));
-  }
-  drush_print(t('Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.'));
-  if(!drush_confirm(t('Do you really want to continue?'))) {
-    drush_die('Aborting.');
-  }
-
-  $package_handler = drush_pm_get_package_handler() .'_update_project';
-  if (!function_exists($package_handler)) {
-    drush_die(t("The $package_handler package handler does not handle updates."));
-  }
-  
-  // Save the date to be used in the backup directory's path name.
-  $date = date('YmdHis');
-  
-  // Now we start the actual updating.
-  foreach($releases as $release) {
-    drush_verbose(t('Starting to update !project ...', array('!project' => $release['title'])));
-    
-    $source = DRUSH_DRUPAL_ROOT .'/' . $release['path'];
-    
-    $skip_backup = module_invoke_all('drush_pm_skip_backup', $source);
-    if (!count($skip_backup)) {
-      $backup_dir = DRUSH_DRUPAL_ROOT. '/backup';
-      drush_op('mkdir', $backup_dir, 0777);
-      $backup_dir .= '/modules';
-      drush_op('mkdir', $backup_dir, 0777);
-      $backup_dir .= "/$date";
-      drush_op('mkdir', $backup_dir, 0777);
-      $backup_target = $backup_dir . '/'. $release['name'];
-      if (!drush_op('rename', $source, $backup_target)) {
-        drush_die(t('Failed to backup project directory !source to !backup_target', array('!source' => $source, '!backup_target' => $backup_target)));
-      }
-    }
-  
-    // Install the new version.
-    // $basepath is the dir where the current module is installed. It's one dir up from the
-    // place of the project's info files.
-    $basepath = explode('/', $release['path']);
-    // move a directory up, so we can copy updated dir to parent
-    array_pop($basepath);
-    $project_parent_path = DRUSH_DRUPAL_ROOT. '/'. implode('/', $basepath). '/';
-    if (!$package_handler($release['name'], $release['releases'][$release['candidate_version']], $project_parent_path)) {
-      if (!count($skip_backup)) {
-        drush_error(t('Updating project !project failed. Restoring previously installed version.', array('!project' => $release['name'])));
-        drush_op('rename', $backup_target, $source);
-      }
-      else {
-        drush_error(t('Updating project !project failed. Please revert to the previously installed version.', array('!project' => $release['name'])));
-      }
-    }
-    else {
-      drush_print(t('Project !project was updated successfully. Installed version is now !version.', array('!project' => $release['name'], '!version' => $release['candidate_version'])));
-      module_invoke_all('drush_pm_post_update', $release['name'], $release['releases'][$release['candidate_version']], $project_parent_path);
-    }
-  }
-  if ($backup_dir) {
-    drush_print(t("Backups were saved into the directory !backup_dir.", array('!backup_dir' => $backup_dir))); 
-  }
-  drush_print(t("You should now run update.php through your browser."));
-}
-
-/**
- * Find a module handler
- */
-function drush_pm_get_package_handler() {
-  $package_handlers = module_invoke_all('drush_pm_package_handler');
-  
-  if (empty($package_handlers)) {
-    drush_die(t("No package handlers found."));
-  }
-
-  $handler = drush_get_option('handler');
-  // See if we have the full handler provided
-  if (array_search($handler, $package_handlers)) {
-    return $handler;
-  }
-  // Allow a shortcut for any functions named drush_pm_*
-  if (array_search('drush_pm_'. $handler, $package_handlers)) {
-    return 'drush_pm_'. $handler;
-  }
-
-  // Fallback on the first provided handler (from the lightest module)
-  return $package_handlers[0];
-}
-
-/**
- * Get update information for all installed projects.
- *
- * @return An array containing remote and local versions for all installed projects
- */
-function _drush_pm_get_update_info($projects = NULL) {
-  $info = update_get_available();
-  $data = update_calculate_project_data($info);
-  $data = drush_pm_get_project_path($data);
-  return $data;
-}
-
-/**
- * Command callback. Refresh update status information.
- */
-function drush_pm_refresh() {
-  drush_print(t("Refreshing update status information ..."));
-  update_refresh();
-  drush_print(t("Done."));
-}
-
-/**
- * Get project information from drupal.org.
- *
- * @param $projects An array of project names
- */
-function drush_pm_get_project_info($projects) {
-  $info = array();
-  $data = array();
-  foreach ($projects as $project_name => $project) {
-    $url = UPDATE_DEFAULT_URL. "/$project_name/". DRUPAL_CORE_COMPATIBILITY;
-    $xml = drupal_http_request($url);
-    $data[] = $xml->data;
-  }
-  if ($data) {
-    include_once drupal_get_path('module', 'update') .'/update.fetch.inc';
-    $parser = new update_xml_parser;
-    $info = $parser->parse($data);
-  }
-  return $info;
-}
-
-/**
- * Get the recommended release for a certain so far uninstalled project.
- *
- * @param $project A project information array for the requested project 
- * @param $info A project information array for this project, as returned by an update service from drush_pm_get_project_info()
- */
-function drush_pm_get_release($project, $info) {
-  $minor = '';
-  $version_patch_changed = '';
-
-  if ($project['version']) {
-    // The user specified a specific version - try to find that exact version
-    foreach($info['releases'] as $version => $release) {
-       // Ignore unpublished releases.
-      if ($release['status'] != 'published') {
-        continue;
-      }
-      
-      // Straight match
-      if (!isset($recommended_version) && $release['version'] == $project['version']) {
-        $recommended_version = $version;
-      }
-      // Shortcut match with ommitted Drupal version
-      if (!isset($recommended_version) && $release['version'] == DRUPAL_CORE_COMPATIBILITY .'-'. $project['version']) {
-        $recommended_version = $version;
-      }
-    }
-  }
-  else {
-    // No version specified - try to find the best version we can
-    foreach($info['releases'] as $version => $release) {
-       // Ignore unpublished releases.
-      if ($release['status'] != 'published') {
-        continue;
-      }
-  
-      // If we haven't found a recommended version yet, put the dev
-      // version as recommended and hope it gets overwritten later.
-      // Look for the 'latest version' if we haven't found it yet.
-      // Latest version is defined as the most recent version for the
-      // default major version.
-      if (!isset($latest_version) && $release['version_major'] == $info['default_major']) {
-        $latest_version = $version;
-      }
-  
-      if (!isset($recommended_version) && $release['version_major'] == $info['default_major']) {
-        if ($minor != $release['version_patch']) {
-          $minor = $release['version_patch'];
-          $version_patch_changed = $version;
-        }
-        if (empty($release['version_extra']) && $minor == $release['version_patch']) {
-          $recommended_version = $version_patch_changed;
-        }
-        continue;
-      }
-    }
-  }
-
-  if (isset($recommended_version)) {
-    return $info['releases'][$recommended_version];
-  }
-  else if (isset($latest_version)) {
-    return $info['releases'][$latest_version];
-  }
-  else {
-    return false;
-  }
-}
-
-/**
- * We need to set the project path by looking at the module location. Ideally, update.module would do this for us.
- */
-function drush_pm_get_project_path($projects) {
-  foreach ($projects as $project => $info) {
-    if (!isset($info['path'])  && $project != 'drupal') {
-      // looks for an enabled module.
-      foreach ($info['includes'] as $module => $name) {
-        if ($path = drupal_get_path('module', $module)) {
-          continue;
-        }
-      }
-      // As some modules are not located in their project's root directory
-      // but in a subdirectory (e.g. all the ecommerce modules), we take the module's
-      // info file's path, and then move up until we are at a directory with the
-      // project's name.
-      $parts = explode('/', $path);
-      $i = count($parts) - 1;
-      $stop = array_search($project, $parts);
-      while ($i > $stop) {
-        unset($parts[$i]);
-        $i--;
-      }
-      $projects[$project]['path'] = implode('/', $parts);
-    }
-  }
-  return $projects;
-}
-
-/**
- * A drush command callback. Show release info for given project(s).
- *
- **/
-function drush_pm_info() {
-  $projects = func_get_args();
-  $projects = drupal_map_assoc($projects);
-  $info = drush_pm_get_project_info($projects);
-
-  $rows[] = array(t('Project'), t('Release'), t('Date'));
-  foreach ($info as $key => $project) {
-    foreach ($project['releases'] as $release) {
-
-      $rows[] = array(
-        $key,
-        $release['version'],
-        format_date($release['date'], 'custom', 'Y-M-d'),
-      );
-    }
-  }
-  return drush_print_table($rows, FALSE, TRUE);
-}
-
-/**
- * Deletes a directory, all files in it and all subdirectories in it (recursively).
- * Use with care!
- * Written by Andreas Kalsch
- */
-function delete_dir($dir) {
-  if (substr($dir, strlen($dir)-1, 1) != '/')
-    $dir .= '/';
-
-  if ($handle = opendir($dir)) {
-    while ($obj = readdir($handle)) {
-      if ($obj != '.' && $obj != '..') {
-        if (is_dir($dir.$obj)) {
-          if (!delete_dir($dir.$obj)) {
-            return false;
-          }
-        }
-        elseif (is_file($dir.$obj)) {
-          if (!unlink($dir.$obj)) {
-            return false;
-          }
-        }
-      }
-    }
-
-    closedir($handle);
-
-    if (!@rmdir($dir)) {
-      return false;
-    }
-    return true;
-  }
-  return false;
-}
-
-?>
diff -x .git -rNup export/DRUPAL-6--1/drush_pm/README.txt working/DRUPAL-6--1/drush_pm/README.txt
--- export/DRUPAL-6--1/drush_pm/README.txt	2008-06-19 19:48:10.000000000 +0200
+++ working/DRUPAL-6--1/drush_pm/README.txt	1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-// $Id: README.txt,v 1.6 2008/06/19 17:48:10 weitzman Exp $
-
-DESCRIPTION
------------
-
-drush_pm.module (The Drupal Shell Packet Manager) allows you to install and update contributed modules from the command line.
-
-It provides three commands, "pm install", "pm update", and "pm info".
-
-Run "drush help pm install" and "drush help pm update" to see supported command line options and arguments.
-
-If you use SVN for version control and want to suppress backup of modules when performing a `pm update`, enable drush_pm_svn.module.
-
-REQUIREMENTS
-------------
-No other special requirements on unix-like systems.
-drush_pm uses  wget (or curl), tar and gzip, so if you're trying to use drush_pm on Windows, you have to install
-these binaries before, for example from GnuWin32 (http://gnuwin32.sourceforge.net/).
-
-------------
-Written by Franz Heinzmann (frando) <http://unbiskant.org>.
-No warranties of any kind. Use with care.
\ No newline at end of file
diff -x .git -rNup export/DRUPAL-6--1/drush_pm_cvs/drush_pm_cvs.info working/DRUPAL-6--1/drush_pm_cvs/drush_pm_cvs.info
--- export/DRUPAL-6--1/drush_pm_cvs/drush_pm_cvs.info	2008-08-11 02:36:25.000000000 +0200
+++ working/DRUPAL-6--1/drush_pm_cvs/drush_pm_cvs.info	1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-; $Id: drush_pm_cvs.info,v 1.3.2.1 2008/08/11 00:36:25 weitzman Exp $
-name = Drush package manager CVS support
-description = Allows drush to install and update modules using CVS.
-package = Drush
-dependencies[] = update
-dependencies[] = drush
-dependencies[] = drush_pm
-core = 6.x
diff -x .git -rNup export/DRUPAL-6--1/drush_pm_cvs/drush_pm_cvs.module working/DRUPAL-6--1/drush_pm_cvs/drush_pm_cvs.module
--- export/DRUPAL-6--1/drush_pm_cvs/drush_pm_cvs.module	2008-05-30 05:53:05.000000000 +0200
+++ working/DRUPAL-6--1/drush_pm_cvs/drush_pm_cvs.module	1970-01-01 01:00:00.000000000 +0100
@@ -1,107 +0,0 @@
-<?php
-// $Id: drush_pm_cvs.module,v 1.3 2008/05/30 03:53:05 weitzman Exp $
-
-/**
- * Implementation of hook_help().
- */
-function drush_pm_cvs_help($section) {
-  $help = '';
-  switch ($section) {
-    case 'drush:pm update':
-      $help .= t("--cvsmethod - force cvs updates or checkouts
-e.g. --cvsmethod=update will update the module, and try to merge changes,
-rather than overwriting them. Any conflicts will need to be resolved manually.
-The checkout method is the default for everything except SVN managed projects.\n\n");
-    case 'drush:pm install':
-      // The --cvsparams option is available on both update and install
-      $help .= t("--cvsparams - add options to the cvs command
-e.g. --cvsparams=\"-C\" (note that quotes are required) will overwrite all
-changes when updating an SVN managed project.\n");
-    return $help;
-  }
-}
-
-/**
- * Hook drush_pm_module_handler
- */
-function drush_pm_cvs_drush_pm_package_handler() {
-  return array('drush_pm_cvs');
-}
-
-/**
- * Install a project (so far, only modules are supported).
- *
- * @param $project The short name of the drupal.org project
- * @param $info The details (fetched from drupal.org via xml-rpc)
- * @param $path The path to install the module to.
- */
-function drush_pm_cvs_install_project($project, $info, $path = '.') {
-  drush_op('chdir', $path);
-
-  drush_verbose("Downloading project $project ...");
-
-  $cvsparams = drush_get_option('cvsparams');
-  
-  // Check it out.
-  drush_pm_cvs_checkout($project, $info['tag'], $cvsparams);
-
-  if (is_dir($path . $project) && !DRUSH_SIMULATE) {
-    drush_verbose("Checking out " . $project . " was successful.");
-    return TRUE;
-  }
-  else {
-    return drush_error("Unable to check out $filename to $path from cvs.drupal.org");
-  }
-}
-
-/**
- * Update a project (so far, only modules are supported).
- *
- * @param $project The short name of the drupal.org project
- * @param $info The details (fetched from drupal.org via xml-rpc)
- * @param $path The path to install the module to.
- */
-function drush_pm_cvs_update_project($project, $info, $path = '.') {
-  drush_op('chdir', $path);
-
-  drush_verbose("Updating project $project ...");
-
-  $cvsmethod = drush_get_option('cvsmethod');
-  if (empty($cvsmethod) && file_exists($project. '/.svn')) {
-    // If we have .svn files the default is to update in place
-    // this will try and merge any changes, which could break things
-    // but we assume anyone using SVN is competent enough to deal with this!
-    $cvsmethod = 'update';
-  }
-
-  $cvsparams = drush_get_option('cvsparams');
-  
-  drush_verbose($cvsmethod);
-  drush_verbose(strpos(strtolower($cvsmethod), 'up'));
-  if (substr($cvsmethod, 0, 2) == 'up') {
-  	// Update the working copy.
-  	drush_op('chdir', $project);
-  	if (!drush_shell_exec('cvs update -dP '. $cvsparams . ' -r '. $info['tag'])) {
-  	  drush_die("Unable to update $project from cvs.drupal.org.");
-  	}
-  	drush_op('chdir', '..');
-  }
-  else {
-    // Check it out.
-    drush_pm_cvs_checkout($project, $info['tag'], $cvsparams);
-  }
-
-  if (is_dir($path . $project) && !DRUSH_SIMULATE) {
-    drush_verbose("Updating out " . $project . " was successful.");
-    return TRUE;
-  }
-  else {
-    return drush_error("Unable to update $project from cvs.drupal.org");
-  }
-}
-
-function drush_pm_cvs_checkout($project, $tag, $cvsparams) {
-  if (!drush_shell_exec('cvs -z6 '. $cvsparams .' -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d '. $project .' -r '. $tag .' contributions/modules/'. $project)) {
-    drush_die("Unable to checkout $project from cvs.drupal.org.");
-  }
-}
diff -x .git -rNup export/DRUPAL-6--1/drush_pm_svn/drush_pm_svn.info working/DRUPAL-6--1/drush_pm_svn/drush_pm_svn.info
--- export/DRUPAL-6--1/drush_pm_svn/drush_pm_svn.info	2008-08-11 02:36:25.000000000 +0200
+++ working/DRUPAL-6--1/drush_pm_svn/drush_pm_svn.info	1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-; $Id: drush_pm_svn.info,v 1.1.4.1 2008/08/11 00:36:25 weitzman Exp $
-name = Drush package manager SVN support
-description = Allows drush to manage a site sandbox using SVN.
-package = Drush
-core = 6.x
-dependencies[] = update
-dependencies[] = drush 
-dependencies[] = drush_pm
-
diff -x .git -rNup export/DRUPAL-6--1/drush_pm_svn/drush_pm_svn.module working/DRUPAL-6--1/drush_pm_svn/drush_pm_svn.module
--- export/DRUPAL-6--1/drush_pm_svn/drush_pm_svn.module	2008-05-19 03:31:57.000000000 +0200
+++ working/DRUPAL-6--1/drush_pm_svn/drush_pm_svn.module	1970-01-01 01:00:00.000000000 +0100
@@ -1,120 +0,0 @@
-<?php
-// $Id: drush_pm_svn.module,v 1.1 2008/05/19 01:31:57 weitzman Exp $
-
-/**
- * Implementation of hook_help().
- */
-function drush_pm_svn_help($section) {
-  $help = '';
-  switch ($section) {
-    case 'drush:pm update':
-    case 'drush:pm install':
-      $help .= t("--svnsync - automatically add new files to the Subversion repository and
-remove deleted files. Use this with caution, especially if you leave files in
-project directories that you don't want to be marked for addition, or you
-have deleted a non-project file that you don't want to be marked in svn as a
-deletion.\n
---svncommit - automatically commit project install or update changes to the
-sites Subversion repository. You can only use this option if you are also
-using the --svnsync option, because committing without first adding new and
-removing deleted files will cause unpredictable results.\n 
---svnmessage - Override the commit message from the default, which is:
-'Drush automatic commit: ', and the drush command line used.\n
---svnstatusparams - add options to the 'svn status' command
---svnaddparams - add options to the 'svn add' command
---svnremoveparams - add options to the 'svn remove' command
---svncommitparams - add options to the 'svn commit' command
-e.g. --svncommitparams=\"--username joe\" (note that quotes are required) will
-commit changes as the user 'joe'.\n");
-    return $help;
-  }
-}
-
-/**
- * Implementation of hook_drush_pm_skip_backup().
- */
-function drush_pm_svn_drush_pm_skip_backup($source) {
-  if (file_exists($source. '/.svn')) {
-    // Skip backup since we need all .svn  directories. Assuming admin can use svn revert if new project is bad.
-    drush_verbose(t('Backup skipped because .svn directory was detected. Use Subversion to revert if needed.'));
-    return TRUE;
-  }
-}
-
-/**
- * Implementation of hook_drush_pm_post_update().
- */
-function drush_pm_svn_drush_pm_post_update($project, $info, $path = '.') {
-  if (drush_pm_svn_sync($project, $info, $path)) {
-    // Only attempt commit on a sucessful sync
-    drush_pm_svn_commit($project, $info, $path);
-  }
-}
-
-/**
- * Implementation of hook_drush_pm_post_install().
- */
-function drush_pm_svn_drush_pm_post_install($project, $info, $path = '.') {
-  if (drush_pm_svn_sync($project, $info, $path)) {
-    // Only attempt commit on a sucessful sync
-    drush_pm_svn_commit($project, $info, $path);
-  }
-}
-
-/**
- * Automatically add any unversioned files to Subversion and remove any files
- * that have been deleted on the file system
- */
-function drush_pm_svn_sync($project, $info, $path = '.') {
-  if (drush_get_option('svnsync')) {
-    $errors = '';
-    if (drush_shell_exec('svn status '. drush_get_option('svnstatusparams') .' '. $project)) {
-      $output = drush_shell_exec_output();
-      foreach ($output as $line) {
-        if (preg_match('/^\? *(.*)/', $line, $matches)) {
-          if (!drush_shell_exec('svn add '. drush_get_option('svnaddparams') .' '. $matches[1])) {
-            $errors .= implode("\n", drush_shell_exec_output());
-          }
-        }
-        if (preg_match('/^\! *(.*)/', $line, $matches)) {
-          if (!drush_shell_exec('svn remove '. drush_get_option('svnremoveparams') .' '. $matches[1])) {
-            $errors .= implode("\n", drush_shell_exec_output());
-          }
-        }
-      }
-      if (!empty($errors)) {
-        drush_print(t("Problems were encountered adding or removing files to/from subversion.\nThe specific errors are below:"));
-        drush_print($errors);
-        return FALSE;
-      }
-    }
-    else {
-      drush_print(t("Drush was unable to get the svn status. Check that you have Subversion \ninstalled and that the site is a subversion working copy.\nThe specific errors are below:"));
-      drush_print(implode("\n", drush_shell_exec_output()));
-      return FALSE;
-    }
-    return TRUE;
-  }
-}
-
-/**
- * Automatically commit changes to the repository
- */
-function drush_pm_svn_commit($project, $info, $path = '.') {
-  if (drush_get_option('svncommit')) {
-    $message = drush_get_option('svnmessage');
-    if (empty($message)) {
-      $message = t("Drush automatic commit: \n") . implode(' ', $_SERVER['argv']);
-    }
-    if (drush_shell_exec('svn commit '. drush_get_option('svncommitparams') .' -m "'. $message .'" '. $project)) {
-      drush_print(t('Project committed to Subversion successfully'));
-    }
-    else {
-      drush_print(t("'Problems were encountered committing your changes to Subversion.\nThe specific errors are below:"));
-      drush_print(implode("\n", drush_shell_exec_output()));
-    }
-  }
-  else {
-    drush_print(t("You should consider committing the new code to your Subversion repository.\nIf this version becomes undesireable, use Subversion to roll back."));
-  }
-}
diff -x .git -rNup export/DRUPAL-6--1/drush_pm_wget/drush_pm_wget.info working/DRUPAL-6--1/drush_pm_wget/drush_pm_wget.info
--- export/DRUPAL-6--1/drush_pm_wget/drush_pm_wget.info	2008-08-11 02:36:25.000000000 +0200
+++ working/DRUPAL-6--1/drush_pm_wget/drush_pm_wget.info	1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-; $Id: drush_pm_wget.info,v 1.3.2.1 2008/08/11 00:36:25 weitzman Exp $
-name = Drush package manager wget support
-description = Allows drush to install and update modules using wget or curl.
-package = Drush
-dependencies[] = update
-dependencies[] = drush
-dependencies[] = drush_pm
-core = 6.x
diff -x .git -rNup export/DRUPAL-6--1/drush_pm_wget/drush_pm_wget.module working/DRUPAL-6--1/drush_pm_wget/drush_pm_wget.module
--- export/DRUPAL-6--1/drush_pm_wget/drush_pm_wget.module	2008-01-08 05:30:19.000000000 +0100
+++ working/DRUPAL-6--1/drush_pm_wget/drush_pm_wget.module	1970-01-01 01:00:00.000000000 +0100
@@ -1,83 +0,0 @@
-<?php
-// $Id: drush_pm_wget.module,v 1.1 2008/01/08 04:30:19 weitzman Exp $
-
-/**
- * Implementation of hook_help().
- */
-function drush_pm_wget_help($section) {
-  switch ($section) {
-    case 'drush:pm install':
-    case 'drush:pm update':
-      return t("Note: the wget handler will use the curl command if wget is not found\n");
-  }
-}
-
-/**
- * Hook drush_pm_module_handler
- */
-function drush_pm_wget_drush_pm_package_handler() {
-  return array('drush_pm_wget');
-}
-
-/**
- * Install a project (so far, only modules are supported).
- *
- * @param $project The short name of the drupal.org project
- * @param $info The details (fetched from drupal.org via xml-rpc)
- * @param $path The path to install the module to.
- */
-function drush_pm_wget_install_project($project, $info, $path = '.') {
-
-  drush_op('chdir', $path);
-
-  drush_verbose("Downloading project $project ...");
-
-  // Get the filename...
-  $filename = explode('/', $info['download_link']);
-  $filename = array_pop($filename);
-
-  // Download it.
-  if (!drush_shell_exec("wget " .$info['download_link'])) {
-    drush_shell_exec("curl -O " .$info['download_link']);
-  }
-
-  if (file_exists($path. $filename) || DRUSH_SIMULATE) {
-    drush_verbose("Downloading " . $filename . " was successful.");
-  }
-  else {
-    return drush_error("Unable to download $filename to $path from ". $info['download_link']);
-  }
-
-  // Check Md5 hash
-  if (md5_file($filename) != $info['mdhash'] && !DRUSH_SIMULATE) {
-    drush_op('unlink', $filename);
-    return drush_error("Error: File $filename is corrupt (wrong md5 checksum).");
-  }
-  else {
-    drush_verbose("Md5 checksum of $filename verified.");
-  }
-
-  // Decompress
-  drush_shell_exec("gzip -d " . $filename);
-  $filename = substr($filename, 0, strlen($filename)-3);
-  // Untar
-  drush_shell_exec("tar -xf " . $filename);
-  // We're not using tar -xzf because that's not working on windows...
-
-  // Remove the tarball
-  drush_op('unlink', $filename);
-
-  if (!is_dir($path . $project) && !DRUSH_SIMULATE) {
-    return drush_error("Error. Downloaded file $filename couldn't be untarred correctly");
-  }
-  else {
-    return TRUE;
-  }
-}
-
-/**
- * This is an alias of the install function, since they are identical
- */
-function drush_pm_wget_update_project($project, $info, $path = '.') {
-  return drush_pm_wget_install_project($project, $info, $path);
-}
diff -x .git -rNup export/DRUPAL-6--1/drush_simpletest/drush_simpletest.info working/DRUPAL-6--1/drush_simpletest/drush_simpletest.info
--- export/DRUPAL-6--1/drush_simpletest/drush_simpletest.info	2008-08-11 02:36:25.000000000 +0200
+++ working/DRUPAL-6--1/drush_simpletest/drush_simpletest.info	1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-; $Id: drush_simpletest.info,v 1.2.2.1 2008/08/11 00:36:25 weitzman Exp $
-name = Drush simpletest runner
-description = Run unit tests.
-package = Drush
-dependencies[] = drush
-dependencies[] = simpletest
-core = 6.x
diff -x .git -rNup export/DRUPAL-6--1/drush_simpletest/drush_simpletest.module working/DRUPAL-6--1/drush_simpletest/drush_simpletest.module
--- export/DRUPAL-6--1/drush_simpletest/drush_simpletest.module	2008-07-24 16:21:13.000000000 +0200
+++ working/DRUPAL-6--1/drush_simpletest/drush_simpletest.module	1970-01-01 01:00:00.000000000 +0100
@@ -1,78 +0,0 @@
-<?php
-// $Id: drush_simpletest.module,v 1.3.2.1 2008/07/24 14:21:13 weitzman Exp $
-
-/**
- * @file
- *
- */
-
-/**
- * Implementation of hook_help().
- */
-function drush_simpletest_help($section) {
-  switch ($section) {
-      case 'drush:test run':
-        return t("Usage drush [options] test run<classes>.\n\nRun the specified specified unit tests. If <classes> is omitted, all tests are run. <classes> should be a list of classes separated by a comma. For example: PageCreationTest,PageViewTest.");
-      case 'drush:test list':
-        return t("Usage drush [options] test list.\n\nList the available tests. Use drush test run command to run them. ");
-  }
-}
-
-/**
- * Implementation of hook_drush_command().
- */
-function drush_simpletest_drush_command() {
-  $items['test run'] = array(
-    'callback' => 'drush_test_run',
-    'description' => 'Run one or more Simpletest tests.',
-  );
-  $items['test list'] = array(
-    'callback' => 'drush_test_list',
-    'description' => 'List the available Simpletest test classes.',
-  );
-  return $items;
-}
-
-function drush_test_list() {
-  simpletest_load();
-  // TODO: Refactor simpletest.module so we don't copy code from DrupalUnitTests
-  $files = array();
-  foreach (module_list() as $module) {
-    $module_path = drupal_get_path('module', $module);
-    if (file_exists($module_path .'/tests/')) {
-      $dir = $module_path .'/tests';
-      $tests = file_scan_directory($dir, '\.test$');
-      $files = array_merge($files, $tests);
-    }   
-  }   
-  $files = array_keys($files);
-
-  $existing_classes = get_declared_classes();
-  foreach ($files as $file) {
-    include_once($file);
-  }
-  $classes = array_diff(get_declared_classes(), $existing_classes);
-  $rows[] = array(t('Class'), t('Name'), t('Description'));
-  foreach ($classes as $class) {
-    $tmp = new $class;
-    if (method_exists($tmp, 'get_info')) {
-      $info =  $tmp->get_info();
-      $rows[] = array($class, $info['name'], truncate_utf8($info['desc'], 30, TRUE, TRUE));
-    }
-  }
-  return drush_print_table($rows, 0, TRUE);
-}
-
-
-function drush_test_run($tests = NULL) {
-  simpletest_load();
-  if (is_null($tests)) {
-    drush_print(t('Running all tests'));
-    $result = simpletest_run_tests();
-    }
-  else {
-    $tests = explode(',', $tests);
-    $result = simpletest_run_tests($tests, 'text');
-  }
-  return $result;
-}
diff -x .git -rNup export/DRUPAL-6--1/drush_sql/drush_sql.info working/DRUPAL-6--1/drush_sql/drush_sql.info
--- export/DRUPAL-6--1/drush_sql/drush_sql.info	2008-08-11 02:36:25.000000000 +0200
+++ working/DRUPAL-6--1/drush_sql/drush_sql.info	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-; $Id: drush_sql.info,v 1.3.2.1 2008/08/11 00:36:25 weitzman Exp $
-name = Drush SQL commands
-description = Provides several tools for database query and management
-package = Drush
-dependencies[] = drush
-core = 6.x
diff -x .git -rNup export/DRUPAL-6--1/drush_sql/drush_sql.module working/DRUPAL-6--1/drush_sql/drush_sql.module
--- export/DRUPAL-6--1/drush_sql/drush_sql.module	2008-11-01 05:27:46.000000000 +0100
+++ working/DRUPAL-6--1/drush_sql/drush_sql.module	1970-01-01 01:00:00.000000000 +0100
@@ -1,329 +0,0 @@
-<?php
-// $Id: drush_sql.module,v 1.12.2.1 2008/11/01 04:27:46 weitzman Exp $
-
-/**
- * @file
- *  The drush SQL commands
- */
-
-/**
- * Implementation of hook_help().
- */
-function drush_sql_help($section) {
-  switch ($section) {
-    case 'drush:sql dump':
-      return t('Prints the whole database to STDOUT or save to a file by passing --result-file option. The file should be relative to Drupal root.');
-    case 'drush:sql query':
-      return t('Usage: drush [options] sql query <query> <skip>...\n\n<query> is a SQL statement, which can alternatively be passed via STDIN. Any additional arguments are passed to the mysql command directly.');
-    case 'drush:sql load':
-      return t('Usage: drush [options] sql load <source_dir> <target_dir> <skip>. <source_dir> and <target_dir> are names of directories under \'sites\'. These determine from where and to where you want your database copied. Optional: specify \'common\' for <skip> if you wish to omit disposable tables like cache*, search*, etc. Your skip lists are specified in your drushrc.php file. Any additional arguments are passed to the mysqldump command directly.');
-  }
-}
-
-/**
- * Implementation of hook_drush_command().
- */
-function drush_sql_drush_command() {
-  $items['sql url'] = array(
-    'callback' => 'drush_sql_url',
-    'description' => 'Print database connection details.'
-  );
-  $items['sql version server'] = array(
-    'callback' => 'drush_sql_version_server',
-    'description' => 'Print database server version number.'
-  );
-  $items['sql version client'] = array(
-    'callback' => 'drush_sql_version_client',
-    'description' => 'Print database client library version number.'
-  );
-  $items['sql dump'] = array(
-    'callback' => 'drush_sql_dump',
-    'description' => 'Exports the Drupal DB as SQL using mysqldump or pg_dump.'
-  );
-  $items['sql query'] = array(
-    'callback' => 'drush_sql_query',
-    'description' => 'Execute a query against the site database.'
-  );
-  $items['sql load'] = array(
-    'callback' => 'drush_sql_load',
-    'description' => 'Copy source database to target database.'
-  );
-  return $items;
-}
-
-
-/**
- * Command callback. Displays the Drupal site's database connection string.
- */
-function drush_sql_url() {
-  drush_print($GLOBALS['db_url']);
-}
-
-/**
- * Command callback. Displays the MySQL or PostgreSQL server version number.
- */
-function drush_sql_version_server() {
-  switch (_drush_sql_get_scheme()) {
-    case 'mysql':
-    case 'mysqli':
-      drush_print(mysql_get_server_info());
-      break;
-    case 'pgsql':
-      // NOTE: apparently the server version is only available if PHP was
-      // compiled with PostgreSQL 7.4 or later, so we'll fall back to
-      // displaying the client version if that's the case.
-      $info = pg_version();
-      drush_print(isset($info['server_version']) ? $info['server_version'] : $info['client']);
-      break;
-    default:
-      drush_die(_drush_sql_get_invalid_url_msg());
-  }
-}
-
-/**
- * Command callback. Displays the MySQL or PostgreSQL client version number.
- */
-function drush_sql_version_client() {
-  switch (_drush_sql_get_scheme()) {
-    case 'mysql':
-    case 'mysqli':
-      drush_print(mysql_get_client_info());
-      break;
-    case 'pgsql':
-      $info = pg_version();
-      drush_print($info['client']);
-      break;
-    default:
-      drush_die(_drush_sql_get_invalid_url_msg());
-  }
-}
-
-/**
- * Command callback. Outputs the entire Drupal database in SQL format using mysqldump or
- * pg_dump.
- *
- * @param db_url
- * @param execute
- * @param skip
- *    A key in the sql_skip array which specifies a list of tables to ignore when migrating.
- */
-function drush_sql_dump($db_url = NULL, $execute = TRUE, $skip = NULL) {
-  if (is_null($db_url)) {
-    $db_url = $GLOBALS['db_url'];
-  }
-
-  switch (_drush_sql_get_scheme($db_url)) {
-    case 'mysql':
-    case 'mysqli':
-      $exec = 'mysqldump' . (DRUSH_VERBOSE ? ' -v' : '');
-      if ($file = drush_get_option('result-file')) {
-        $exec .= ' --result-file '. $file;
-      }
-      $exec .= ' --opt -Q' . _drush_sql_get_credentials($db_url);
-      break;
-    case 'pgsql':
-      drush_die(t('Sorry, pg_dump support not implemented yet.')); // TODO: pg_dump command.
-      break;
-    default:
-      drush_die(_drush_sql_get_invalid_url_msg($db_url));
-  }
-
-  // Get any arguments to be passed through to the SQL client program.
-  if (func_num_args() > 3 && ($args = func_get_args())) {
-    $args = ' ' . implode(' ', array_slice($args, 3)); // skip standard arguments
-  }
-  
-  // Skip large core tables if instructed.  Used by 'sql load' command.
-    if ($skip && strpos($exec, '--ignore-table') === FALSE) {
-      $all_skip_tables = (array)drush_get_option('skip-tables');
-      $skip_tables = $all_skip_tables[$skip];
-      $database = _drush_sql_get_database($db_url);
-      foreach ($skip_tables as $table) {
-        $ignores[] = "--ignore-table=$database.$table";
-      }
-      $exec .= ' '. implode(' ', $ignores);
-    }
-  
-  if (!$execute) {
-    return $exec;
-  }
-  
-  if (DRUSH_VERBOSE) {
-    drush_print(t('Executing: !cmd', array('!cmd' => $exec)));
-  }
-
-  return drush_op('system', $exec) !== FALSE;
-}
-
-/**
- * Command callback. Executes the given SQL query on the Drupal database.
- * Reads from STDIN if no query is provided.
- */
-function drush_sql_query($query = NULL) {
-  // Get any arguments to be passed through to the SQL client program.
-  if (func_num_args() > 1 && ($args = func_get_args())) {
-    $args = ' ' . implode(' ', array_slice($args, 1)); // skip query argument
-  }
-  
-  return drush_sql_query_execute($query, NULL, $args);
-}
-
-function drush_sql_query_execute($query, $db_url = NULL, $args = NULL) {
-  // FIXME: currently we require the query due to an apparent inability to
-  // run the mysql child process interactively. Need to look more into
-  // proc_open() to see if it could be used for interactive execution.
-  if (empty($query)) {
-    if ($fstat = fstat(STDIN)) {
-      $query = fread(STDIN,$fstat[size]);
-    }
-    else {
-      drush_die(t('No SQL query given as argument.'));
-    }
-  }
-  
-  // Save query to a file. we will redirect it in.
-  $filename = time(). '.sql';
-  if ($file = file_save_data($query, $filename)) {
-    switch (_drush_sql_get_scheme()) {
-      case 'mysql':
-      case 'mysqli':
-        $exec = 'mysql' . (DRUSH_VERBOSE ? ' -v' : '');
-        $exec .= _drush_sql_get_credentials($db_url);
-        $exec .= " < ./$file";
-        break;
-      case 'pgsql':
-        drush_die(t('Sorry, psql support not implemented yet.')); // TODO: psql command.
-        break;
-      default:
-        drush_die(_drush_sql_get_invalid_url_msg($db_url));
-    }
-    $exec .= $args;
-
-    if (DRUSH_VERBOSE) {
-      drush_print(t('Executing: !cmd', array('!cmd' => $exec)));
-    }
-    $return = drush_op('system', $exec) !== FALSE;
-    unlink($file);  
-    return $return;
-  }
-}
-
-/**
- * Copy an entire database to another database. For example, migrate from Production to dev
- * or dev to staging.
- * 
- * conf_path() uses a static var so we can't use it to figure out paths based on URIs.
- *
- * @param source
- *   The name of a subdirectory under sites. Its settings.php specifies the database which should be migrated.
- * @param target
- *    The name of a subdirectory under sites. Its settings.php specifies the database which whose tables will 
- *    be replaced with the contents of `source`.
- * @param skip
- *    A key in the sql_skip array which specifies a list of tables to ignore when migrating.
- * 
- **/
-function drush_sql_load($source, $target, $skip = NULL) {
-  // Don't use require_once - we need to ovewrite db_url under some circumstances.
-  require "./sites/$source/settings.php";
-  $db_url_source = is_array($db_url) ? $db_url['default'] : $db_url;
-  require "./sites/$target/settings.php";
-  $db_url_target = is_array($db_url) ? $db_url['default'] : $db_url;
-  
-  // Prompt for confirmation. This is destructive.
-  if (!DRUSH_SIMULATE) {
-    drush_print(t("You will destroy data from !target and replace with data from !source.", array('!source' => $db_url_source, '!target' => $db_url_target)));
-    // TODO: actually make the backup if desired.
-    drush_print(t("You might want to make a backup first, using sql_dump command.\n"));
-    if (!drush_confirm(t('Do you really want to continue?'))) {
-      drush_die('Aborting.');
-    }
-  }
-  
-  // Get command to export from source.
-  if ($retrieve = drush_sql_dump($db_url_source, FALSE, $skip)) {
-    // Get any arguments to be passed through to the mysqldump.
-    $args = array();
-    if (func_num_args() > 3 && ($args = func_get_args())) {
-      $retrieve .= ' ' . implode(' ', array_slice($args, 3)); // skip standard arguments
-    }
-    
-    // Build import command for target.
-    $send = 'mysql' . (DRUSH_VERBOSE ? ' -v' : '');
-    $send .= _drush_sql_get_credentials($db_url_target);
-    
-    // Build pipe command and redirect output to the bit bucket.
-    // Redirection prevented loads of SQL from writing to screen.
-    $exec = "$retrieve | $send > /dev/null 2>&1";
-
-    if (DRUSH_VERBOSE) {
-      drush_print(t('Executing: !cmd', array('!cmd' => $exec)));
-    }
-    
-    $return = drush_op('system', $exec) !== FALSE;
-  }
-  return $return;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// SQL SERVICE HELPERS
-
-// this sets some globals so please beware.
-function drush_sql_get_path($uri) {
-  $drupal_base_url = parse_url($uri);
-  $_SERVER['HTTP_HOST'] = $drupal_base_url['host'];
-  $_SERVER['PHP_SELF'] = $drupal_base_url['path'].'/index.php';
-  return conf_path();
-}
-
-function _drush_sql_get_scheme($db_url = NULL) {
-  if (is_null($db_url)) {
-    $db_url = $GLOBALS['db_url'];
-  }
-  $url = (object)parse_url($db_url);
-  return ($url->scheme);
-}
-
-function _drush_sql_get_database($db_url = NULL) {
-  if (is_null($db_url)) {
-    $db_url = $GLOBALS['db_url'];
-  }
-  $url = (object)parse_url($db_url);
-  return substr($url->path, 1);
-}
-
-function _drush_sql_get_credentials($db_url = NULL) {
-  if (is_null($db_url)) {
-    $db_url = $GLOBALS['db_url'];
-  }
-
-  // NOTE: this regex could also parse the connection string URL:
-  //   ^([\w]+)://([\w\d_]+):([^@]*)@([\w\d\.\-]*)/([\w\d_]+)$
-
-  $url = (object)parse_url($db_url);
-  $url->user = urldecode($url->user);
-  $url->pass = urldecode($url->pass);
-  $url->host = urldecode($url->host);
-  $url->path = substr(urldecode($url->path), 1); // skip leading '/' character
-
-  switch ($url->scheme) {
-    case 'mysql':
-    case 'mysqli':
-      return ' -h' . $url->host .
-        (!isset($url->port) ? '' : ' -P' . $url->port) .
-        ' -u' . $url->user .
-        (empty($url->pass) ? '' : ' -p' . $url->pass) . ' ' . $url->path;
-    case 'pgsql':
-      drush_die(t('Sorry, psql support not implemented yet.')); // TODO: psql credentials.
-      return;
-    default:
-      drush_die(_drush_sql_get_invalid_url_msg());
-  }
-}
-
-function _drush_sql_get_invalid_url_msg($db_url = NULL) {
-  if (is_null($db_url)) {
-    $db_url = $GLOBALS['db_url'];
-  }
-  return t('Unable to parse DB connection string: `%url\'.', array('%url' => $db_url));
-}
\ No newline at end of file
diff -x .git -rNup export/DRUPAL-6--1/drush_sql/README.txt working/DRUPAL-6--1/drush_sql/README.txt
--- export/DRUPAL-6--1/drush_sql/README.txt	2008-02-11 21:57:24.000000000 +0100
+++ working/DRUPAL-6--1/drush_sql/README.txt	1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-// $Id: README.txt,v 1.2 2008/02/11 20:57:24 weitzman Exp $
-
-DESCRIPTION
------------
-
-drush_sql.module (The Drupal Shell SQL Manager) allows you to interact with the database from the command line.
-
-The three most interesting commands are:
-
-sql query: execute a query against the site database
-
-sql dump: Exports the Drupal DB as SQL using mysqldump or pg_dump.
-
-sql load: Migrate a database dump between two databases. Those databases are specified in your multi-site Drupal.
-
-
-TIPS
-------------
-Using the -l command line option for drush.php, you can easily run SQL commands against any site in your multisite installation.
-
-CREDITS
-------------
-Authored by  Arto Bendiken <http://bendiken.net/>. 
-Maintained by Moshe Weitzman <weitzman AT tejasa DOT com>
\ No newline at end of file
diff -x .git -rNup export/DRUPAL-6--1/drush_tools/drush_tools.info working/DRUPAL-6--1/drush_tools/drush_tools.info
--- export/DRUPAL-6--1/drush_tools/drush_tools.info	2008-08-11 02:36:26.000000000 +0200
+++ working/DRUPAL-6--1/drush_tools/drush_tools.info	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-; $Id: drush_tools.info,v 1.5.2.1 2008/08/11 00:36:26 weitzman Exp $
-name = Drush toolbox
-description = Provides several tools that are aimed at site administrators and developers.
-package = Drush
-dependencies[] = drush
-core = 6.x
diff -x .git -rNup export/DRUPAL-6--1/drush_tools/drush_tools.module working/DRUPAL-6--1/drush_tools/drush_tools.module
--- export/DRUPAL-6--1/drush_tools/drush_tools.module	2008-11-15 05:39:17.000000000 +0100
+++ working/DRUPAL-6--1/drush_tools/drush_tools.module	1970-01-01 01:00:00.000000000 +0100
@@ -1,152 +0,0 @@
-<?php
-// $Id: drush_tools.module,v 1.9.2.6 2008/11/15 04:39:17 weitzman Exp $
-
-/**
- * @file drush_trools.sql
- *
- * A soup of site utilities.
- *
- */
-
-/**
- * Implementation of hook_help().
- */
-function drush_tools_help($section) {
-  switch ($section) {
-    case 'drush:watchdog show':
-      return t("Usage: drush [options] watchdog show <n> <type>\n\nShow the <n> (default 10) most recent watchdog messages. Optionally show only messages of type <type>.");
-    case 'drush:watchdog delete':
-      return t("Usage: drush [options] watchdog delete <type>\n\nDelete all messages of type <type>. Use 'all' to delete all messages, no matter which type they are of.");
-      case 'drush:sync':
-        return t("Usage: drush [options] sync <source> <destination>\n\nRsync the entire drupal directory or a subdirectory to a <destination> using ssh. Excludes .svn directories. Useful for pushing copies of your tree to a staging server, or retrieving a files directory from a remote site. Local paths should be specified relative to Drupal root.");
-        case 'drush:eval':
-          return t("Usage: drush eval <code>\n\nRun arbitrary PHP code in the context of Drupal. For example: drush eval \"variable_set('hello', 'world');\".");
-  }
-}
-
-/**
- * Implementation of hook_drush_command().
- */
-function drush_tools_drush_command() {
-  $items['cache clear'] = array(
-    'callback' => 'drush_tools_cache_clear',
-    'description' => 'Clear all caches'
-  );
-  $items['cron'] = array(
-    'callback' => 'drush_tools_cron_run',
-    'description' => 'Run cron'
-  );
-  $items['watchdog show'] = array(
-    'callback' => 'drush_tools_watchdog_show',
-    'description' => 'Show the most recent watchdog log messages'
-  );
-  $items['watchdog delete'] = array(
-    'callback' => 'drush_tools_watchdog_delete',
-    'description' => 'Delete all messages of a certain type'
-  );
-  $items['sync'] = array(
-    'callback' => 'drush_tools_sync',
-    'description' => 'Rsync the Drupal tree to/from another server using ssh'
-  );
-  $items['eval'] = array(
-    'callback' => 'drush_tools_eval',
-    'description' => 'Evaluate a command',
-  );
-  return $items;
-}
-
-function drush_tools_cron_run() {
-  drupal_cron_run();
-  drush_print(t('Cron run successfully.'));
-}
-
-function drush_tools_cache_clear() {
-  drupal_flush_all_caches();
-  drush_print(t('Cache cleared.'));
-}
-
-/**
- * Push files from or to the local Drupal install using SSH and RSync
- *
- * @return void
- **/
-function drush_tools_sync($source, $destination) {
-  // Local paths are relative to Drupal root
-  if (!strstr($source, ':')) {
-    $source = DRUSH_DRUPAL_ROOT. "/$source";
-  }
-  if (!strstr($destination, ':')) {
-    $destination = DRUSH_DRUPAL_ROOT. "/$destination";
-  }
-  
-  // Prompt for confirmation. This is destructive.
-  if (!DRUSH_SIMULATE) {
-    drush_print(t("You will destroy data from !target and replace with data from !source", array('!source' => $source, '!target' => $destination)));
-    if (!drush_confirm(t('Do you really want to continue?'))) {
-      drush_die('Aborting.');
-    }
-  }
-  
-  $options = '-az';
-  $exec = "rsync -e ssh $options --exclude \"*.svn*\" $source $destination";
-  if (DRUSH_VERBOSE) {
-    // the drush_op() will be verbose about the command that gets executed.
-    $options .= 'v';
-  }
-
-  return drush_op('system', $exec) !== FALSE;
-}
-/**
- * Displays the most recent watchdog log messages (default: 10 messages).
- */
-function drush_tools_watchdog_show($limit = 10, $type = NULL) {
-  $severities = array(WATCHDOG_NOTICE => t('notice'), WATCHDOG_WARNING => t('warning'), WATCHDOG_ERROR => t('error'));
-
-  $sql = 'SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid ORDER BY w.wid DESC';
-  $result = (!empty($type) ?
-    db_query_range($sql . " WHERE w.type = '%s'", $type, 0, (int)$limit) :
-    db_query_range($sql, 0, (int)$limit));
-  
-
-  $rows = array();
-  module_load_include('inc', 'dblog', 'dblog.admin');
-  while ($watchdog = db_fetch_object($result)) {
-    $rows[] = array(
-      format_date($watchdog->timestamp, 'small'),
-      $severities[$watchdog->severity],
-      t($watchdog->type),
-      truncate_utf8(decode_entities(strtr($watchdog->message, unserialize($watchdog->variables))), 68, FALSE, FALSE),
-      theme('username', $watchdog),
-    );
-  }
-
-  if (count($rows) == 0) {
-    drush_die(t('No log messages available.'));
-  }
-  drush_verbose(t('Last !count watchdog log messages:', array('!count' => $limit)));
-
-  array_unshift($rows, array(t('Date'), t('Severity'), t('Type'), t('Message'), t('User')));
-  drush_print_table($rows, 2, TRUE);
-}
-
-/**
- * Deletes all log messages of a certain type from the watchdog log
- * (default: all).
- */
-function drush_tools_watchdog_delete($type = NULL) {
-  if ($type == "all") {
-    drush_op('db_query', 'DELETE FROM {watchdog}'); // indiscriminately delete all
-    drush_print(t('Deleted !n rows.', array('!n' => db_affected_rows())));
-  }
-  elseif (!empty($type)) {
-    drush_op('db_query', 'DELETE FROM {watchdog} WHERE type = \'%s\'', $type);
-    drush_print(t('Deleted !n rows.', array('!n' => db_affected_rows())));
-  }
-  else {
-    drush_print(t('Please specify a message type, or "all" to delete all messages.'));
-  }
-}
-
-function drush_tools_eval($command) {
-  eval($command);
-}
\ No newline at end of file
diff -x .git -rNup export/DRUPAL-6--1/drush_tools/README.txt working/DRUPAL-6--1/drush_tools/README.txt
--- export/DRUPAL-6--1/drush_tools/README.txt	2008-02-11 21:57:24.000000000 +0100
+++ working/DRUPAL-6--1/drush_tools/README.txt	1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-// $Id: README.txt,v 1.3 2008/02/11 20:57:24 weitzman Exp $
-
-DESCRIPTION
------------
-drush_tools.module provides several useful commands for site developers and administrators. Run 'drush help' to see a list of available commands, and 'drush help <command>' for command-specific help.
-
-REQUIREMENTS
-------------
-drush.module
-
-------------
-Written by Franz Heinzmann (frando) <http://unbiskant.org>.
-Expanded by Moshe Weitzman - http://drupal.org/moshe
\ No newline at end of file
diff -x .git -rNup export/DRUPAL-6--1/example.drush.inc working/DRUPAL-6--1/example.drush.inc
--- export/DRUPAL-6--1/example.drush.inc	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/example.drush.inc	2008-11-24 00:57:03.000000000 +0100
@@ -0,0 +1,75 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ *   Example drush command.
+ *
+ *   Shows how to make your own drush command.
+ *
+ *   You can copy this file either into a .drush folder in your HOME folder,
+ *   along with one of your existing modules or in a folder specified with 
+ *   the include option.
+ */
+
+/**
+ * Implementation of hook_drush_command().
+ *
+ * In this hook, you specify which commands your
+ * drush module makes available, what it does and 
+ * description.
+ *
+ * Notice how this structure closely resembles how 
+ * you define menu hooks.
+ *
+ * @return
+ *   An associative array describing your command(s).
+ */
+function example_drush_command() {
+  $items = array();
+
+  // the key in the $items array is the name of the command.
+  $items['example'] = array(
+    // the name of the function implementing your command.
+    'callback' => 'example_callback',
+    // a short description of your command
+    'description' => "Drush example command. It doesn't to a lot",
+  );
+
+  // more commands here ...
+
+  return $items;
+}
+
+/**
+ * Implementation of hook_drush_help().
+ *
+ * This function is called whenever a drush user calls
+ * 'drush help <name-of-your-command>'
+ *
+ * @return
+ *   A string with the help text for your command.
+ */
+function example_drush_help() {
+  return "Prints the amount of time since january 1st, 1970, in years and weeks."
+}
+
+
+/**
+ * Example drush command callback.
+ *
+ * This is where the action takes place.
+ *
+ * In this function, all of Drupals API is (usually) available, including
+ * any functions you have added in your own modules/themes.
+ *
+ * To print something to the terminal window, use drush_print().
+ *
+ */
+function example_callback() {
+  $commands = func_get_args();
+  
+  // Using the Drupal API function 'format_interval()'
+  // 
+  drush_print(format_interval(time()));
+}
diff -x .git -rNup export/DRUPAL-6--1/example.drushrc.php working/DRUPAL-6--1/example.drushrc.php
--- export/DRUPAL-6--1/example.drushrc.php	2008-11-14 23:08:56.000000000 +0100
+++ working/DRUPAL-6--1/example.drushrc.php	2008-11-23 10:57:13.000000000 +0100
@@ -18,6 +18,9 @@
 // specify your Drupal core base directory (useful if you use symlinks)
 // $options['r'] = '/home/USER/workspace/drupal-6';
 
+// specify additional directories to search for *.drush.inc files
+// $options['i'] = 'sites/default:profiles/myprofile'; 
+
 // enable verbose mode
 // $options['v'] = 1; 
 
diff -x .git -rNup export/DRUPAL-6--1/includes/drush.drush.inc working/DRUPAL-6--1/includes/drush.drush.inc
--- export/DRUPAL-6--1/includes/drush.drush.inc	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/drush.drush.inc	2008-11-23 16:37:03.000000000 +0100
@@ -0,0 +1,82 @@
+<?php
+// $Id$
+
+/**
+ * @file Drush commands
+ *
+ * Defines the drush help command.
+ */
+
+/**
+ * Implementation of hook_drush_command().
+ */
+function drush_drush_command() {
+  $items['help'] = array(
+    'callback' => 'drush_callback_help',
+    'description' => 'View help. Run "drush help [command]" to view command-specific help.'
+  );
+  return $items;
+}
+
+/**
+ * Get the available options for Drush.
+ *
+ * @return
+ *    An associative array containing the option definition as the key, and the description as the value,
+ *    for each of the available options.
+ */
+function drush_get_options() {
+  // TODO: Add a hook for this, to allow other modules to add their options
+  $options['-r <path>, --root=<path>'] = t("Drupal root directory to use (default: current directory)");
+  $options['-l <uri> , --uri=<uri>']   = t('URI of the drupal site to use (only needed in multisite environments)');
+  $options['-v, --verbose']            = t('Display all available output');
+  $options['-y, --yes']                = t("Assume 'yes' as answer to all prompts");
+  $options['-s, --simulate']           = t("Simulate all relevant actions (don't actually change the system)");
+  $options['-i, --include']           = t("A list of paths to search for drush commands");
+  $options['-c, --config']             = t("Specify a config file to use. See example.drushrc.php");
+  return $options;
+}
+
+/**
+ * Command callback. Display help.
+ */
+function drush_callback_help() {
+  $commands = func_get_args();
+
+  // Display general help text if no command is specified.
+  if (empty($commands)) {
+    drush_print(t('Usage: drush.php [options] <command> <command> ...'));
+    drush_print();
+    drush_print(t('Options: '));
+    foreach (drush_get_options() as $option => $description) {
+      $rows[] = array($option, $description);
+    }
+
+    drush_print_table($rows, 2);
+    drush_print();
+    drush_print('Commands: ');
+
+    $commands = drush_get_commands();
+    $rows = array();
+    foreach($commands as $key => $command) {
+      $rows[] = array($key, $commands[$key]['description']);
+    }
+    drush_print_table($rows, 2);
+  }
+  // Print command specific help.
+  else {
+    $commandstring = implode(" ", $commands);
+
+    if (!drush_is_command($commandstring)) {
+      return drush_error(t('Invalid command !command.', array('!command' => implode(" ", $commands))));
+    }
+
+    $help = drush_module_invoke_all('drush_help', 'drush:'. $commandstring);
+    if (!empty($help)) {
+      drush_print(implode("\n", $help));
+    }
+    else {
+      drush_print(t("No help available for command 'drush $commandstring'."));
+    }
+  }
+}
diff -x .git -rNup export/DRUPAL-6--1/includes/pm_cvs.drush.inc working/DRUPAL-6--1/includes/pm_cvs.drush.inc
--- export/DRUPAL-6--1/includes/pm_cvs.drush.inc	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/pm_cvs.drush.inc	2008-11-23 16:31:55.000000000 +0100
@@ -0,0 +1,111 @@
+<?php
+// $Id$
+
+/**
+ * @file Drush PM CVS extension
+ */
+
+/**
+ * Implementation of hook_drush_help().
+ */
+function pm_cvs_drush_help($section) {
+  $help = '';
+  switch ($section) {
+    case 'drush:pm update':
+      $help .= t("--cvsmethod - force cvs updates or checkouts
+e.g. --cvsmethod=update will update the module, and try to merge changes,
+rather than overwriting them. Any conflicts will need to be resolved manually.
+The checkout method is the default for everything except SVN managed projects.\n\n");
+    case 'drush:pm install':
+      // The --cvsparams option is available on both update and install
+      $help .= t("--cvsparams - add options to the cvs command
+e.g. --cvsparams=\"-C\" (note that quotes are required) will overwrite all
+changes when updating an SVN managed project.\n");
+      return $help;
+  }
+}
+
+/**
+ * Hook drush_pm_module_handler
+ */
+function pm_cvs_drush_pm_package_handler() {
+  return array('drush_pm_cvs');
+}
+
+/**
+ * Install a project (so far, only modules are supported).
+ *
+ * @param $project The short name of the drupal.org project
+ * @param $info The details (fetched from drupal.org via xml-rpc)
+ * @param $path The path to install the module to.
+ */
+function drush_pm_cvs_install_project($project, $info, $path = '.') {
+  drush_op('chdir', $path);
+
+  drush_verbose("Downloading project $project ...");
+
+  $cvsparams = drush_get_option('cvsparams');
+
+  // Check it out.
+  drush_pm_cvs_checkout($project, $info['tag'], $cvsparams);
+
+  if (is_dir($path . $project) && !DRUSH_SIMULATE) {
+    drush_verbose("Checking out " . $project . " was successful.");
+    return TRUE;
+  }
+  else {
+    return drush_error("Unable to check out $filename to $path from cvs.drupal.org");
+  }
+}
+
+/**
+ * Update a project (so far, only modules are supported).
+ *
+ * @param $project The short name of the drupal.org project
+ * @param $info The details (fetched from drupal.org via xml-rpc)
+ * @param $path The path to install the module to.
+ */
+function drush_pm_cvs_update_project($project, $info, $path = '.') {
+  drush_op('chdir', $path);
+
+  drush_verbose("Updating project $project ...");
+
+  $cvsmethod = drush_get_option('cvsmethod');
+  if (empty($cvsmethod) && file_exists($project. '/.svn')) {
+    // If we have .svn files the default is to update in place
+    // this will try and merge any changes, which could break things
+    // but we assume anyone using SVN is competent enough to deal with this!
+    $cvsmethod = 'update';
+  }
+
+  $cvsparams = drush_get_option('cvsparams');
+
+  drush_verbose($cvsmethod);
+  drush_verbose(strpos(strtolower($cvsmethod), 'up'));
+  if (substr($cvsmethod, 0, 2) == 'up') {
+    // Update the working copy.
+    drush_op('chdir', $project);
+    if (!drush_shell_exec('cvs update -dP '. $cvsparams . ' -r '. $info['tag'])) {
+      drush_die("Unable to update $project from cvs.drupal.org.");
+    }
+    drush_op('chdir', '..');
+  }
+  else {
+    // Check it out.
+    drush_pm_cvs_checkout($project, $info['tag'], $cvsparams);
+  }
+
+  if (is_dir($path . $project) && !DRUSH_SIMULATE) {
+    drush_verbose("Updating out " . $project . " was successful.");
+    return TRUE;
+  }
+  else {
+    return drush_error("Unable to update $project from cvs.drupal.org");
+  }
+}
+
+function drush_pm_cvs_checkout($project, $tag, $cvsparams) {
+  if (!drush_shell_exec('cvs -z6 '. $cvsparams .' -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d '. $project .' -r '. $tag .' contributions/modules/'. $project)) {
+    drush_die("Unable to checkout $project from cvs.drupal.org.");
+  }
+}
diff -x .git -rNup export/DRUPAL-6--1/includes/pm.drush.inc working/DRUPAL-6--1/includes/pm.drush.inc
--- export/DRUPAL-6--1/includes/pm.drush.inc	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/pm.drush.inc	2008-11-23 16:31:50.000000000 +0100
@@ -0,0 +1,613 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ *  The drush Package Manager
+ *
+ * Terminology:
+ * - Request: a requested package (string or keyed array), with a project name and (optionally) version.
+ * - Project: a drupal.org project, such as cck or drush.
+ * - Version: a requested version, such as 1.0 or 1.x-dev.
+ * - Release: a specific release of a project, with associated metadata (from the drupal.org update service).
+ * - Package: the collection of files that make up a release.
+ */
+
+/**
+ * Project is a user requested version update.
+ */
+define('DRUSH_PM_REQUESTED_UPDATE', 101);
+
+/**
+ * User requested version already installed.
+ */
+define('DRUSH_PM_REQUESTED_CURRENT', 102);
+
+/**
+ * Implementation of hook_drush_help().
+ */
+function pm_drush_help($section) {
+  $handlers = str_replace('pm_', '', drush_module_invoke_all('drush_pm_package_handler'));
+  if ($handlers) {
+    $handlers[0] = $handlers[0] .' (default)';
+    $handler = '--handler - specify which package handler you would like to use.
+  Available options: '. implode(', ', $handlers) . "\n";
+  }
+  else {
+    $handler = "ERROR: You must activate a drush Package Manager handler module in order
+     to install or update packages.";
+  }
+
+  switch ($section) {
+    case 'drush:pm install':
+      return t("Usage: drush [options] pm install <package_1> <package_2> ...
+<package_n> is the short name of a project hosted on drupal.org,
+or the short name and the version number (Drupal major version is optional).
+e.g. project, project-5.x-1.0, project-1.0, project-1.x-dev, project-1.1-rc1
+So far, only modules are supported.\n
+The modules will be installed into a site specific modules directory if one
+exists, otherwise sites/all/modules is used.
+After installing, you still have to activate on the normal module
+administration page\n\n". $handler);
+
+    case 'drush:pm update':
+      return t("Usage: drush [options] pm update\n
+Displays update status information and allows to update all installed packages
+to the latest recommended version (so far, only modules are supported).
+If you only want to update certain projects, pass those as additional
+arguments (e.g. cck devel views ...).
+Note: The user is asked to confirm before the actual update is started.
+Use the -y option to answer all questions with yes automatically.\n\n". $handler);
+
+    case 'drush:pm info':
+      return t("Usage: drush [options] pm info <package_1> <package_2> ...\n
+View all releases for a given project. Useful for deciding which version to install/update.
+    ");
+  }
+}
+
+function drush_pm_requirements($phase) {
+  switch ($phase) {
+    case 'runtime':
+      $package_handlers = drush_module_invoke_all('drush_pm_package_handler');
+      $requirements['handlers'] = array(
+        'title' => t('Drush: Package handler'),
+        'description' => t('In order to use the Drush package manager module to install/update projects, you must install one of its package handler modules.'),
+        'severity' => empty($package_handlers) ? REQUIREMENT_ERROR : REQUIREMENT_OK,
+      );
+      break;
+  }
+  return is_array($requirements) ? $requirements : array();
+}
+
+/**
+ * Implementation of hook_drush_command().
+ */
+function pm_drush_command() {
+  $items['pm install'] = array(
+    'callback' => 'drush_pm_install',
+    'description' => 'Install one or more modules'
+  );
+  $items['pm refresh'] = array(
+    'callback' => 'drush_pm_refresh',
+    'description' => 'Refresh update status information'
+  );
+  $items['pm update'] = array(
+    'callback' => 'drush_pm_update',
+    'description' => 'Update your modules'
+  );
+  $items['pm info'] = array(
+    'callback' => 'drush_pm_info',
+    'description' => 'Release information for a module'
+  );
+  return $items;
+}
+
+
+/**
+ * Parse out the project name and version and return as a structured array
+ *
+ * @param $requests an array of project names
+ */
+function drush_pm_parse_project_version($requests) {
+  $requestdata = array();
+  foreach($requests as $request) {
+    // project-HEAD or project-5.x-1.0-beta
+    // '5.x-' is optional, as is '-beta'
+    preg_match('/-(HEAD|(\d+)\.([\dx]+)(-.+)?)$/', $request, $matches);
+    if ($matches[0]) {
+      // Specific version requested
+      $version = $matches[0];
+      $project = substr($request, 0, strlen($request) - strlen($version));
+    }
+    else {
+      // Recommended stable version requested
+      $project = $request;
+    }
+    if (empty($project)) {
+      drush_die(t("Project name not found.\n\nRun drush help pm install for more information."));
+    }
+    $requestdata[$project] = array(
+      'name' => $project,
+      'version' => trim($version, ' -'),
+    );
+  }
+  return $requestdata;
+}
+
+/**
+ * Command callback. Installs one or more packages (so far only modules).
+ */
+function drush_pm_install() {
+  $requests = func_get_args();
+  if (empty($requests)) {
+    drush_die(t("No project specified.\n\nRun drush help pm install for more information."));
+  }
+
+  // Parse out project name and version
+  $requests = drush_pm_parse_project_version($requests);
+
+  // If a URI is provided then we install to that specific site, otherwise we install to sites/all/modules
+  if (DRUSH_URI) {
+    $path = conf_path();
+    $modulepath = DRUSH_DRUPAL_ROOT .'/'. $path .'/modules/';
+  }
+
+  if (!isset($modulepath) || !file_exists($modulepath)) {
+    $modulepath = DRUSH_DRUPAL_ROOT .'/sites/all/modules/';
+  }
+
+  // Get the module info from drupal.org via xml-rpc
+  $releases = drush_pm_get_project_info($requests);
+  if (!$releases) {
+    drush_die(t("None of the given projects exists or has releases that are compatible with your Drupal version."));
+  }
+
+  $startdir = getcwd();
+
+  $package_handler = drush_pm_get_package_handler() .'_install_project';
+  if (!function_exists($package_handler)) {
+    drush_die(t("The $package_handler package handler does not handle installs."));
+  }
+
+  // Download and install each module
+  foreach($requests as $project => $request) {
+    if (isset($releases[$project]) && $release = drush_pm_get_release($request, $releases[$project])) {
+      if (is_dir($modulepath . $project)) {
+        drush_error(t('Project !project is already installed. Skipping.', array('!project' => $project)));
+      }
+      elseif ($package_handler($project, $release, $modulepath)) {
+        drush_print(t("Project !project successfully installed (version !version).",
+                      array('!project' => $project, '!version' => $release['version'])));
+        drush_module_invoke_all('drush_pm_post_install', $project, $release, $modulepath);
+      }
+    }
+    else {
+      drush_error(t('Project !project doesn\' exist or has no releases that are compatible with your Drupal version. Skipping.', array('!project' => $project)));
+    }
+  }
+
+  drush_op('chdir', $startdir);
+}
+
+/**
+ * Command callback. Displays update status info and allows to update installed modules.
+ * Pass specific projects as arguments, otherwise we update all that have candidate releases.
+ *
+ * This command prompts for confirmation before updating, so it is safe to run just to check on
+ * In this case, say at the confirmation prompt.
+ */
+function drush_pm_update() {
+  // Get update status information.
+  $releases = _drush_pm_get_update_info();
+
+  // Get specific requests
+  $requests = func_get_args();
+
+  // Parse out project name and version
+  $requests = drush_pm_parse_project_version($requests);
+
+  // Preprocess releases
+  if (!empty($requests)) {
+    // Force update projects where a specific version is reqested
+    foreach ($requests as $project => $request) {
+      if (!empty($request['version'])) {
+        // Match the requested release
+        $release = drush_pm_get_release($request, $releases[$project]);
+        if ($release['version'] == $releases[$project]['existing_version']) {
+          $releases[$project]['status'] = DRUSH_PM_REQUESTED_CURRENT;
+        }
+        else {
+          $releases[$project]['status'] = DRUSH_PM_REQUESTED_UPDATE;
+        }
+        // Set the candidate version to the requested release
+        $releases[$project]['candidate_version'] = $release['version'];
+      }
+    }
+  }
+
+  // Table headers.
+  $rows[] = array(t('Name'), t('Installed version'), t('Recommended version'), t('Status'));
+
+  // Process releases, notifying user of status and building a list of proposed updates
+  $updateable = array();
+  foreach ($releases as $release) {
+    if (!$release['title']) {
+      continue;
+    }
+
+    switch($release['status']) {
+      case UPDATE_CURRENT:
+        $status = t('Up to date');
+        $release['candidate_version'] = $release['recommended'];
+        break;
+      case UPDATE_NOT_CURRENT:
+        $status = t('Update available');
+        $release['candidate_version'] = $release['recommended'];
+        $updateable[$release['name']] = $release;
+        break;
+      case UPDATE_NOT_SECURE:
+        $status = t('SECURITY UPDATE available');
+        $release['candidate_version'] = $release['recommended'];
+        $updateable[$release['name']] = $release;
+        break;
+      case UPDATE_REVOKED:
+        $status = t('Intalled version REVOKED');
+        $release['candidate_version'] = $release['recommended'];
+        $updateable[$project['name']] = $release;
+        break;
+      case DRUSH_PM_REQUESTED_UPDATE:
+        $status = t('Specified version available');
+        $updateable[$release['name']] = $release;
+        break;
+      case DRUSH_PM_REQUESTED_CURRENT:
+        $status = t('Specified version already installed');
+        break;
+      case UPDATE_NOT_SUPPORTED:
+        $status = t('Installed version not supported');
+        $release['candidate_version'] = $release['recommended'];
+        $updateable[$project['name']] = $release;
+        break;
+      case UPDATE_NOT_CHECKED:
+        $status = t('Unable to check status');
+        break;
+      case UPDATE_UNKNOWN:
+      default:
+        $status = t('Unknown');
+        break;
+    }
+
+    $rows[] = array($release['title'], $release['existing_version'], $release['candidate_version'], $status);
+  }
+
+  $last = variable_get('update_last_check', 0);
+  drush_print(t('Update information last refreshed: ') . ($last  ? format_date($last) : t('Never')));
+  drush_print();
+  drush_print(t("Update status information on all installed and enabled Drupal modules:"));
+  drush_print_table($rows, 2, TRUE);
+  drush_print();
+
+  // If specific project updates were requested then remove releases for all others
+  if (!empty($requests)) {
+    foreach ($updateable as $project => $release) {
+      if (!isset($requests[$project])) {
+        unset($updateable[$project]);
+      }
+    }
+  }
+
+  if (empty($updateable)) {
+    drush_die(t('No updates available.'));
+  }
+
+  // Offer to update to the identified releases
+  drush_pm_update_packages($updateable);
+}
+
+/**
+ * Update packages according to an array of releases, following interactive
+ * confirmation from the user.
+ *
+ * @param $releases
+ *   An array of releases from the drupal.org update service, with an additional
+ *   array key candidate_version that specifies the version to be installed.
+ */
+function drush_pm_update_packages($releases) {
+  if (isset($releases['drupal'])) {
+    drush_print("NOTE: An update for the Drupal core is available. \nDrupal itself can't yet be updated by this tool. Please update Drupal manually.\n");
+    unset($releases['drupal']);
+  }
+
+  drush_print(t('Updates will be made to the following projects:'));
+  foreach($releases as $release) {
+    $print .= $release['title'] . " [" . $release['name'] . '-' . $release['candidate_version'] . "], ";
+  }
+  drush_print(substr($print, 0, strlen($print)-2));
+  drush_print();
+  drush_print(t("Note: Updated modules can potentially break your site. It's not recommended to update production sites without prior testing."));
+  if (module_exists('drush_pm_svn')) {
+    drush_print(t("Note: A backup of your package will be stored to backups directory if no .svn directory is found."));
+  }
+  drush_print(t('Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.'));
+  if(!drush_confirm(t('Do you really want to continue?'))) {
+    drush_die('Aborting.');
+  }
+
+  $package_handler = drush_pm_get_package_handler() .'_update_project';
+  if (!function_exists($package_handler)) {
+    drush_die(t("The $package_handler package handler does not handle updates."));
+  }
+
+  // Save the date to be used in the backup directory's path name.
+  $date = date('YmdHis');
+
+  // Now we start the actual updating.
+  foreach($releases as $release) {
+    drush_verbose(t('Starting to update !project ...', array('!project' => $release['title'])));
+
+    $source = DRUSH_DRUPAL_ROOT .'/' . $release['path'];
+
+    $skip_backup = drush_module_invoke_all('drush_pm_skip_backup', $source);
+    if (!count($skip_backup)) {
+      $backup_dir = DRUSH_DRUPAL_ROOT. '/backup';
+      drush_op('mkdir', $backup_dir, 0777);
+      $backup_dir .= '/modules';
+      drush_op('mkdir', $backup_dir, 0777);
+      $backup_dir .= "/$date";
+      drush_op('mkdir', $backup_dir, 0777);
+      $backup_target = $backup_dir . '/'. $release['name'];
+      if (!drush_op('rename', $source, $backup_target)) {
+        drush_die(t('Failed to backup project directory !source to !backup_target', array('!source' => $source, '!backup_target' => $backup_target)));
+      }
+    }
+
+    // Install the new version.
+    // $basepath is the dir where the current module is installed. It's one dir up from the
+    // place of the project's info files.
+    $basepath = explode('/', $release['path']);
+    // move a directory up, so we can copy updated dir to parent
+    array_pop($basepath);
+    $project_parent_path = DRUSH_DRUPAL_ROOT. '/'. implode('/', $basepath). '/';
+    if (!$package_handler($release['name'], $release['releases'][$release['candidate_version']], $project_parent_path)) {
+      if (!count($skip_backup)) {
+        drush_error(t('Updating project !project failed. Restoring previously installed version.', array('!project' => $release['name'])));
+        drush_op('rename', $backup_target, $source);
+      }
+      else {
+        drush_error(t('Updating project !project failed. Please revert to the previously installed version.', array('!project' => $release['name'])));
+      }
+    }
+    else {
+      drush_print(t('Project !project was updated successfully. Installed version is now !version.', array('!project' => $release['name'], '!version' => $release['candidate_version'])));
+      drush_module_invoke_all('drush_pm_post_update', $release['name'], $release['releases'][$release['candidate_version']], $project_parent_path);
+    }
+  }
+  if ($backup_dir) {
+    drush_print(t("Backups were saved into the directory !backup_dir.", array('!backup_dir' => $backup_dir)));
+  }
+  drush_print(t("You should now run update.php through your browser."));
+}
+
+/**
+ * Find a module handler
+ */
+function drush_pm_get_package_handler() {
+  $package_handlers = drush_module_invoke_all('drush_pm_package_handler');
+
+  if (empty($package_handlers)) {
+    drush_die(t("No package handlers found."));
+  }
+
+  $handler = drush_get_option('handler');
+  // See if we have the full handler provided
+  if (array_search($handler, $package_handlers)) {
+    return $handler;
+  }
+  // Allow a shortcut for any functions named drush_pm_*
+  if (array_search('drush_pm_'. $handler, $package_handlers)) {
+    return 'drush_pm_'. $handler;
+  }
+
+  // Fallback on the first provided handler (from the lightest module)
+  return $package_handlers[0];
+}
+
+/**
+ * Get update information for all installed projects.
+ *
+ * @return An array containing remote and local versions for all installed projects
+ */
+function _drush_pm_get_update_info($projects = NULL) {
+  $info = update_get_available();
+  $data = update_calculate_project_data($info);
+  $data = drush_pm_get_project_path($data);
+  return $data;
+}
+
+/**
+ * Command callback. Refresh update status information.
+ */
+function drush_pm_refresh() {
+  drush_print(t("Refreshing update status information ..."));
+  update_refresh();
+  drush_print(t("Done."));
+}
+
+/**
+ * Get project information from drupal.org.
+ *
+ * @param $projects An array of project names
+ */
+function drush_pm_get_project_info($projects) {
+  $info = array();
+  $data = array();
+  foreach ($projects as $project_name => $project) {
+    $url = UPDATE_DEFAULT_URL. "/$project_name/". DRUPAL_CORE_COMPATIBILITY;
+    $xml = drupal_http_request($url);
+    $data[] = $xml->data;
+  }
+  if ($data) {
+    include_once drupal_get_path('module', 'update') .'/update.fetch.inc';
+    $parser = new update_xml_parser;
+    $info = $parser->parse($data);
+  }
+  return $info;
+}
+
+/**
+ * Get the recommended release for a certain so far uninstalled project.
+ *
+ * @param $project A project information array for the requested project
+ * @param $info A project information array for this project, as returned by an update service from drush_pm_get_project_info()
+ */
+function drush_pm_get_release($project, $info) {
+  $minor = '';
+  $version_patch_changed = '';
+
+  if ($project['version']) {
+    // The user specified a specific version - try to find that exact version
+    foreach($info['releases'] as $version => $release) {
+      // Ignore unpublished releases.
+      if ($release['status'] != 'published') {
+        continue;
+      }
+
+      // Straight match
+      if (!isset($recommended_version) && $release['version'] == $project['version']) {
+        $recommended_version = $version;
+      }
+      // Shortcut match with ommitted Drupal version
+      if (!isset($recommended_version) && $release['version'] == DRUPAL_CORE_COMPATIBILITY .'-'. $project['version']) {
+        $recommended_version = $version;
+      }
+    }
+  }
+  else {
+    // No version specified - try to find the best version we can
+    foreach($info['releases'] as $version => $release) {
+      // Ignore unpublished releases.
+      if ($release['status'] != 'published') {
+        continue;
+      }
+
+      // If we haven't found a recommended version yet, put the dev
+      // version as recommended and hope it gets overwritten later.
+      // Look for the 'latest version' if we haven't found it yet.
+      // Latest version is defined as the most recent version for the
+      // default major version.
+      if (!isset($latest_version) && $release['version_major'] == $info['default_major']) {
+        $latest_version = $version;
+      }
+
+      if (!isset($recommended_version) && $release['version_major'] == $info['default_major']) {
+        if ($minor != $release['version_patch']) {
+          $minor = $release['version_patch'];
+          $version_patch_changed = $version;
+        }
+        if (empty($release['version_extra']) && $minor == $release['version_patch']) {
+          $recommended_version = $version_patch_changed;
+        }
+        continue;
+      }
+    }
+  }
+
+  if (isset($recommended_version)) {
+    return $info['releases'][$recommended_version];
+  }
+  else if (isset($latest_version)) {
+    return $info['releases'][$latest_version];
+  }
+  else {
+    return false;
+  }
+}
+
+/**
+ * We need to set the project path by looking at the module location. Ideally, update.module would do this for us.
+ */
+function drush_pm_get_project_path($projects) {
+  foreach ($projects as $project => $info) {
+    if (!isset($info['path'])  && $project != 'drupal') {
+      // looks for an enabled module.
+      foreach ($info['includes'] as $module => $name) {
+        if ($path = drupal_get_path('module', $module)) {
+          continue;
+        }
+      }
+      // As some modules are not located in their project's root directory
+      // but in a subdirectory (e.g. all the ecommerce modules), we take the module's
+      // info file's path, and then move up until we are at a directory with the
+      // project's name.
+      $parts = explode('/', $path);
+      $i = count($parts) - 1;
+      $stop = array_search($project, $parts);
+      while ($i > $stop) {
+        unset($parts[$i]);
+        $i--;
+      }
+      $projects[$project]['path'] = implode('/', $parts);
+    }
+  }
+  return $projects;
+}
+
+/**
+ * A drush command callback. Show release info for given project(s).
+ *
+ **/
+function drush_pm_info() {
+  $projects = func_get_args();
+  $projects = drupal_map_assoc($projects);
+  $info = drush_pm_get_project_info($projects);
+
+  $rows[] = array(t('Project'), t('Release'), t('Date'));
+  foreach ($info as $key => $project) {
+    foreach ($project['releases'] as $release) {
+
+      $rows[] = array(
+        $key,
+        $release['version'],
+        format_date($release['date'], 'custom', 'Y-M-d'),
+      );
+    }
+  }
+  return drush_print_table($rows, FALSE, TRUE);
+}
+
+/**
+ * Deletes a directory, all files in it and all subdirectories in it (recursively).
+ * Use with care!
+ * Written by Andreas Kalsch
+ */
+function delete_dir($dir) {
+  if (substr($dir, strlen($dir)-1, 1) != '/')
+    $dir .= '/';
+
+  if ($handle = opendir($dir)) {
+    while ($obj = readdir($handle)) {
+      if ($obj != '.' && $obj != '..') {
+        if (is_dir($dir.$obj)) {
+          if (!delete_dir($dir.$obj)) {
+            return false;
+          }
+        }
+        elseif (is_file($dir.$obj)) {
+          if (!unlink($dir.$obj)) {
+            return false;
+          }
+        }
+      }
+    }
+
+    closedir($handle);
+
+    if (!@rmdir($dir)) {
+      return false;
+    }
+    return true;
+  }
+  return false;
+}
+
+
diff -x .git -rNup export/DRUPAL-6--1/includes/pm.README.txt working/DRUPAL-6--1/includes/pm.README.txt
--- export/DRUPAL-6--1/includes/pm.README.txt	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/pm.README.txt	2008-11-23 15:53:51.000000000 +0100
@@ -0,0 +1,22 @@
+// $Id$
+
+DESCRIPTION
+-----------
+
+pm.drush.inc (The Drupal Shell Packet Manager) allows you to install and update contributed modules from the command line.
+
+It provides three commands, "pm install", "pm update", and "pm info".
+
+Run "drush help pm install" and "drush help pm update" to see supported command line options and arguments.
+
+If you use SVN for version control and want to suppress backup of modules when performing a `pm update`, enable drush_pm_svn.module.
+
+REQUIREMENTS
+------------
+No other special requirements on unix-like systems.
+drush_pm uses  wget (or curl), tar and gzip, so if you're trying to use drush_pm on Windows, you have to install
+these binaries before, for example from GnuWin32 (http://gnuwin32.sourceforge.net/).
+
+------------
+Written by Franz Heinzmann (frando) <http://unbiskant.org>.
+No warranties of any kind. Use with care.
diff -x .git -rNup export/DRUPAL-6--1/includes/pm_svn.drush.inc working/DRUPAL-6--1/includes/pm_svn.drush.inc
--- export/DRUPAL-6--1/includes/pm_svn.drush.inc	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/pm_svn.drush.inc	2008-11-23 16:32:00.000000000 +0100
@@ -0,0 +1,124 @@
+<?php
+// $Id$
+
+/**
+ * @file Drush pm SVN extension
+ */
+
+/**
+ * Implementation of hook_drush_help().
+ */
+function pm_svn_drush_help($section) {
+  $help = '';
+  switch ($section) {
+    case 'drush:pm update':
+    case 'drush:pm install':
+      $help .= t("--svnsync - automatically add new files to the Subversion repository and
+remove deleted files. Use this with caution, especially if you leave files in
+project directories that you don't want to be marked for addition, or you
+have deleted a non-project file that you don't want to be marked in svn as a
+deletion.\n
+--svncommit - automatically commit project install or update changes to the
+sites Subversion repository. You can only use this option if you are also
+using the --svnsync option, because committing without first adding new and
+removing deleted files will cause unpredictable results.\n
+--svnmessage - Override the commit message from the default, which is:
+'Drush automatic commit: ', and the drush command line used.\n
+--svnstatusparams - add options to the 'svn status' command
+--svnaddparams - add options to the 'svn add' command
+--svnremoveparams - add options to the 'svn remove' command
+--svncommitparams - add options to the 'svn commit' command
+e.g. --svncommitparams=\"--username joe\" (note that quotes are required) will
+commit changes as the user 'joe'.\n");
+      return $help;
+  }
+}
+
+/**
+ * Implementation of hook_drush_pm_skip_backup().
+ */
+function pm_svn_drush_pm_skip_backup($source) {
+  if (file_exists($source. '/.svn')) {
+    // Skip backup since we need all .svn  directories. Assuming admin can use svn revert if new project is bad.
+    drush_verbose(t('Backup skipped because .svn directory was detected. Use Subversion to revert if needed.'));
+    return TRUE;
+  }
+}
+
+/**
+ * Implementation of hook_drush_pm_post_update().
+ */
+function pm_svn_drush_pm_post_update($project, $info, $path = '.') {
+  if (drush_pm_svn_sync($project, $info, $path)) {
+    // Only attempt commit on a sucessful sync
+    drush_pm_svn_commit($project, $info, $path);
+  }
+}
+
+/**
+ * Implementation of hook_drush_pm_post_install().
+ */
+function pm_svn_drush_pm_post_install($project, $info, $path = '.') {
+  if (drush_pm_svn_sync($project, $info, $path)) {
+    // Only attempt commit on a sucessful sync
+    drush_pm_svn_commit($project, $info, $path);
+  }
+}
+
+/**
+ * Automatically add any unversioned files to Subversion and remove any files
+ * that have been deleted on the file system
+ */
+function drush_pm_svn_sync($project, $info, $path = '.') {
+  if (drush_get_option('svnsync')) {
+    $errors = '';
+    if (drush_shell_exec('svn status '. drush_get_option('svnstatusparams') .' '. $project)) {
+      $output = drush_shell_exec_output();
+      foreach ($output as $line) {
+        if (preg_match('/^\? *(.*)/', $line, $matches)) {
+          if (!drush_shell_exec('svn add '. drush_get_option('svnaddparams') .' '. $matches[1])) {
+            $errors .= implode("\n", drush_shell_exec_output());
+          }
+        }
+        if (preg_match('/^\! *(.*)/', $line, $matches)) {
+          if (!drush_shell_exec('svn remove '. drush_get_option('svnremoveparams') .' '. $matches[1])) {
+            $errors .= implode("\n", drush_shell_exec_output());
+          }
+        }
+      }
+      if (!empty($errors)) {
+        drush_print(t("Problems were encountered adding or removing files to/from subversion.\nThe specific errors are below:"));
+        drush_print($errors);
+        return FALSE;
+      }
+    }
+    else {
+      drush_print(t("Drush was unable to get the svn status. Check that you have Subversion \ninstalled and that the site is a subversion working copy.\nThe specific errors are below:"));
+      drush_print(implode("\n", drush_shell_exec_output()));
+      return FALSE;
+    }
+    return TRUE;
+  }
+}
+
+/**
+ * Automatically commit changes to the repository
+ */
+function drush_pm_svn_commit($project, $info, $path = '.') {
+  if (drush_get_option('svncommit')) {
+    $message = drush_get_option('svnmessage');
+    if (empty($message)) {
+      $message = t("Drush automatic commit: \n") . implode(' ', $_SERVER['argv']);
+    }
+    if (drush_shell_exec('svn commit '. drush_get_option('svncommitparams') .' -m "'. $message .'" '. $project)) {
+      drush_print(t('Project committed to Subversion successfully'));
+    }
+    else {
+      drush_print(t("'Problems were encountered committing your changes to Subversion.\nThe specific errors are below:"));
+      drush_print(implode("\n", drush_shell_exec_output()));
+    }
+  }
+  else {
+    drush_print(t("You should consider committing the new code to your Subversion repository.\nIf this version becomes undesireable, use Subversion to roll back."));
+  }
+}
diff -x .git -rNup export/DRUPAL-6--1/includes/pm_wget.drush.inc working/DRUPAL-6--1/includes/pm_wget.drush.inc
--- export/DRUPAL-6--1/includes/pm_wget.drush.inc	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/pm_wget.drush.inc	2008-11-23 16:32:10.000000000 +0100
@@ -0,0 +1,87 @@
+<?php
+// $Id$
+
+/**
+ * @file Drush PM Wget extension
+ */
+
+/**
+ * Implementation of hook_drush_help().
+ */
+function pm_wget_drush_help($section) {
+  switch ($section) {
+    case 'drush:pm install':
+    case 'drush:pm update':
+      return t("Note: the wget handler will use the curl command if wget is not found\n");
+  }
+}
+
+/**
+ * Hook drush_pm_module_handler
+ */
+function pm_wget_drush_pm_package_handler() {
+  return array('drush_pm_wget');
+}
+
+/**
+ * Install a project (so far, only modules are supported).
+ *
+ * @param $project The short name of the drupal.org project
+ * @param $info The details (fetched from drupal.org via xml-rpc)
+ * @param $path The path to install the module to.
+ */
+function drush_pm_wget_install_project($project, $info, $path = '.') {
+
+  drush_op('chdir', $path);
+
+  drush_verbose("Downloading project $project ...");
+
+  // Get the filename...
+  $filename = explode('/', $info['download_link']);
+  $filename = array_pop($filename);
+
+  // Download it.
+  if (!drush_shell_exec("wget " .$info['download_link'])) {
+    drush_shell_exec("curl -O " .$info['download_link']);
+  }
+
+  if (file_exists($path. $filename) || DRUSH_SIMULATE) {
+    drush_verbose("Downloading " . $filename . " was successful.");
+  }
+  else {
+    return drush_error("Unable to download $filename to $path from ". $info['download_link']);
+  }
+
+  // Check Md5 hash
+  if (md5_file($filename) != $info['mdhash'] && !DRUSH_SIMULATE) {
+    drush_op('unlink', $filename);
+    return drush_error("Error: File $filename is corrupt (wrong md5 checksum).");
+  }
+  else {
+    drush_verbose("Md5 checksum of $filename verified.");
+  }
+
+  // Decompress
+  drush_shell_exec("gzip -d " . $filename);
+  $filename = substr($filename, 0, strlen($filename)-3);
+  // Untar
+  drush_shell_exec("tar -xf " . $filename);
+  // We're not using tar -xzf because that's not working on windows...
+
+  // Remove the tarball
+  drush_op('unlink', $filename);
+
+  if (!is_dir($path . $project) && !DRUSH_SIMULATE) {
+    return drush_error("Error. Downloaded file $filename couldn't be untarred correctly");
+  }
+  else {
+    return TRUE;
+  }
+}
+
+/**
+ * This is an alias of the install function, since they are identical
+ */
+function drush_pm_wget_update_project($project, $info, $path = '.') {
+  return drush_pm_wget_install_project($project, $info, $path);
+}
diff -x .git -rNup export/DRUPAL-6--1/includes/simpletest.drush.inc working/DRUPAL-6--1/includes/simpletest.drush.inc
--- export/DRUPAL-6--1/includes/simpletest.drush.inc	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/simpletest.drush.inc	2008-11-23 16:32:16.000000000 +0100
@@ -0,0 +1,77 @@
+<?php
+// $Id$
+
+/**
+ * @file Drush simpletest commands
+ */
+
+/**
+ * Implementation of hook_drush_help().
+ */
+function simpletest_drush_help($section) {
+  switch ($section) {
+    case 'drush:test run':
+      return t("Usage drush [options] test run<classes>.\n\nRun the specified specified unit tests. If <classes> is omitted, all tests are run. <classes> should be a list of classes separated by a comma. For example: PageCreationTest,PageViewTest.");
+    case 'drush:test list':
+      return t("Usage drush [options] test list.\n\nList the available tests. Use drush test run command to run them. ");
+  }
+}
+
+/**
+ * Implementation of hook_drush_command().
+ */
+function simpletest_drush_command() {
+  $items['test run'] = array(
+    'callback' => 'drush_test_run',
+    'description' => 'Run one or more Simpletest tests.',
+  );
+  $items['test list'] = array(
+    'callback' => 'drush_test_list',
+    'description' => 'List the available Simpletest test classes.',
+  );
+  return $items;
+}
+
+function drush_test_list() {
+  simpletest_load();
+  // TODO: Refactor simpletest.module so we don't copy code from DrupalUnitTests
+  $files = array();
+  foreach (module_list() as $module) {
+    $module_path = drupal_get_path('module', $module);
+    if (file_exists($module_path .'/tests/')) {
+      $dir = $module_path .'/tests';
+      $tests = file_scan_directory($dir, '\.test$');
+      $files = array_merge($files, $tests);
+    }
+  }
+  $files = array_keys($files);
+
+  $existing_classes = get_declared_classes();
+  foreach ($files as $file) {
+    include_once($file);
+  }
+  $classes = array_diff(get_declared_classes(), $existing_classes);
+  $rows[] = array(t('Class'), t('Name'), t('Description'));
+  foreach ($classes as $class) {
+    $tmp = new $class;
+    if (method_exists($tmp, 'get_info')) {
+      $info =  $tmp->get_info();
+      $rows[] = array($class, $info['name'], truncate_utf8($info['desc'], 30, TRUE, TRUE));
+    }
+  }
+  return drush_print_table($rows, 0, TRUE);
+}
+
+
+function drush_test_run($tests = NULL) {
+  simpletest_load();
+  if (is_null($tests)) {
+    drush_print(t('Running all tests'));
+    $result = simpletest_run_tests();
+  }
+  else {
+    $tests = explode(',', $tests);
+    $result = simpletest_run_tests($tests, 'text');
+  }
+  return $result;
+}
diff -x .git -rNup export/DRUPAL-6--1/includes/sql.drush.inc working/DRUPAL-6--1/includes/sql.drush.inc
--- export/DRUPAL-6--1/includes/sql.drush.inc	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/sql.drush.inc	2008-11-23 16:32:28.000000000 +0100
@@ -0,0 +1,327 @@
+<?php
+// $Id$
+
+/**
+ * @file Drush sql commands
+ */
+
+/**
+ * Implementation of hook_drush_help().
+ */
+function sql_drush_help($section) {
+  switch ($section) {
+    case 'drush:sql dump':
+      return t('Prints the whole database to STDOUT or save to a file by passing --result-file option. The file should be relative to Drupal root.');
+    case 'drush:sql query':
+      return t('Usage: drush [options] sql query <query> <skip>...\n\n<query> is a SQL statement, which can alternatively be passed via STDIN. Any additional arguments are passed to the mysql command directly.');
+    case 'drush:sql load':
+      return t('Usage: drush [options] sql load <source_dir> <target_dir> <skip>. <source_dir> and <target_dir> are names of directories under \'sites\'. These determine from where and to where you want your database copied. Optional: specify \'common\' for <skip> if you wish to omit disposable tables like cache*, search*, etc. Your skip lists are specified in your drushrc.php file. Any additional arguments are passed to the mysqldump command directly.');
+  }
+}
+
+/**
+ * Implementation of hook_drush_command().
+ */
+function sql_drush_command() {
+  $items['sql url'] = array(
+    'callback' => 'drush_sql_url',
+    'description' => 'Print database connection details.'
+  );
+  $items['sql version server'] = array(
+    'callback' => 'drush_sql_version_server',
+    'description' => 'Print database server version number.'
+  );
+  $items['sql version client'] = array(
+    'callback' => 'drush_sql_version_client',
+    'description' => 'Print database client library version number.'
+  );
+  $items['sql dump'] = array(
+    'callback' => 'drush_sql_dump',
+    'description' => 'Exports the Drupal DB as SQL using mysqldump or pg_dump.'
+  );
+  $items['sql query'] = array(
+    'callback' => 'drush_sql_query',
+    'description' => 'Execute a query against the site database.'
+  );
+  $items['sql load'] = array(
+    'callback' => 'drush_sql_load',
+    'description' => 'Copy source database to target database.'
+  );
+  return $items;
+}
+
+/**
+ * Command callback. Displays the Drupal site's database connection string.
+ */
+function drush_sql_url() {
+  drush_print($GLOBALS['db_url']);
+}
+
+/**
+ * Command callback. Displays the MySQL or PostgreSQL server version number.
+ */
+function drush_sql_version_server() {
+  switch (_drush_sql_get_scheme()) {
+    case 'mysql':
+    case 'mysqli':
+      drush_print(mysql_get_server_info());
+      break;
+    case 'pgsql':
+      // NOTE: apparently the server version is only available if PHP was
+      // compiled with PostgreSQL 7.4 or later, so we'll fall back to
+      // displaying the client version if that's the case.
+      $info = pg_version();
+      drush_print(isset($info['server_version']) ? $info['server_version'] : $info['client']);
+      break;
+    default:
+      drush_die(_drush_sql_get_invalid_url_msg());
+  }
+}
+
+/**
+ * Command callback. Displays the MySQL or PostgreSQL client version number.
+ */
+function drush_sql_version_client() {
+  switch (_drush_sql_get_scheme()) {
+    case 'mysql':
+    case 'mysqli':
+      drush_print(mysql_get_client_info());
+      break;
+    case 'pgsql':
+      $info = pg_version();
+      drush_print($info['client']);
+      break;
+    default:
+      drush_die(_drush_sql_get_invalid_url_msg());
+  }
+}
+
+/**
+ * Command callback. Outputs the entire Drupal database in SQL format using mysqldump or
+ * pg_dump.
+ *
+ * @param db_url
+ * @param execute
+ * @param skip
+ *    A key in the sql_skip array which specifies a list of tables to ignore when migrating.
+ */
+function drush_sql_dump($db_url = NULL, $execute = TRUE, $skip = NULL) {
+  if (is_null($db_url)) {
+    $db_url = $GLOBALS['db_url'];
+  }
+
+  switch (_drush_sql_get_scheme($db_url)) {
+    case 'mysql':
+    case 'mysqli':
+      $exec = 'mysqldump' . (DRUSH_VERBOSE ? ' -v' : '');
+      if ($file = drush_get_option('result-file')) {
+        $exec .= ' --result-file '. $file;
+      }
+      $exec .= ' --opt -Q' . _drush_sql_get_credentials($db_url);
+      break;
+    case 'pgsql':
+      drush_die(t('Sorry, pg_dump support not implemented yet.')); // TODO: pg_dump command.
+      break;
+    default:
+      drush_die(_drush_sql_get_invalid_url_msg($db_url));
+  }
+
+  // Get any arguments to be passed through to the SQL client program.
+  if (func_num_args() > 3 && ($args = func_get_args())) {
+    $args = ' ' . implode(' ', array_slice($args, 3)); // skip standard arguments
+  }
+
+  // Skip large core tables if instructed.  Used by 'sql load' command.
+  if ($skip && strpos($exec, '--ignore-table') === FALSE) {
+    $all_skip_tables = (array)drush_get_option('skip-tables');
+    $skip_tables = $all_skip_tables[$skip];
+    $database = _drush_sql_get_database($db_url);
+    foreach ($skip_tables as $table) {
+      $ignores[] = "--ignore-table=$database.$table";
+    }
+    $exec .= ' '. implode(' ', $ignores);
+  }
+
+  if (!$execute) {
+    return $exec;
+  }
+
+  if (DRUSH_VERBOSE) {
+    drush_print(t('Executing: !cmd', array('!cmd' => $exec)));
+  }
+
+  return drush_op('system', $exec) !== FALSE;
+}
+
+/**
+ * Command callback. Executes the given SQL query on the Drupal database.
+ * Reads from STDIN if no query is provided.
+ */
+function drush_sql_query($query = NULL) {
+  // Get any arguments to be passed through to the SQL client program.
+  if (func_num_args() > 1 && ($args = func_get_args())) {
+    $args = ' ' . implode(' ', array_slice($args, 1)); // skip query argument
+  }
+
+  return drush_sql_query_execute($query, NULL, $args);
+}
+
+function drush_sql_query_execute($query, $db_url = NULL, $args = NULL) {
+  // FIXME: currently we require the query due to an apparent inability to
+  // run the mysql child process interactively. Need to look more into
+  // proc_open() to see if it could be used for interactive execution.
+  if (empty($query)) {
+    if ($fstat = fstat(STDIN)) {
+      $query = fread(STDIN,$fstat[size]);
+    }
+    else {
+      drush_die(t('No SQL query given as argument.'));
+    }
+  }
+
+  // Save query to a file. we will redirect it in.
+  $filename = time(). '.sql';
+  if ($file = file_save_data($query, $filename)) {
+    switch (_drush_sql_get_scheme()) {
+      case 'mysql':
+      case 'mysqli':
+        $exec = 'mysql' . (DRUSH_VERBOSE ? ' -v' : '');
+        $exec .= _drush_sql_get_credentials($db_url);
+        $exec .= " < ./$file";
+        break;
+      case 'pgsql':
+        drush_die(t('Sorry, psql support not implemented yet.')); // TODO: psql command.
+        break;
+      default:
+        drush_die(_drush_sql_get_invalid_url_msg($db_url));
+    }
+    $exec .= $args;
+
+    if (DRUSH_VERBOSE) {
+      drush_print(t('Executing: !cmd', array('!cmd' => $exec)));
+    }
+    $return = drush_op('system', $exec) !== FALSE;
+    unlink($file);
+    return $return;
+  }
+}
+
+/**
+ * Copy an entire database to another database. For example, migrate from Production to dev
+ * or dev to staging.
+ *
+ * conf_path() uses a static var so we can't use it to figure out paths based on URIs.
+ *
+ * @param source
+ *   The name of a subdirectory under sites. Its settings.php specifies the database which should be migrated.
+ * @param target
+ *    The name of a subdirectory under sites. Its settings.php specifies the database which whose tables will
+ *    be replaced with the contents of `source`.
+ * @param skip
+ *    A key in the sql_skip array which specifies a list of tables to ignore when migrating.
+ *
+ **/
+function drush_sql_load($source, $target, $skip = NULL) {
+  // Don't use require_once - we need to ovewrite db_url under some circumstances.
+  require "./sites/$source/settings.php";
+  $db_url_source = is_array($db_url) ? $db_url['default'] : $db_url;
+  require "./sites/$target/settings.php";
+  $db_url_target = is_array($db_url) ? $db_url['default'] : $db_url;
+
+  // Prompt for confirmation. This is destructive.
+  if (!DRUSH_SIMULATE) {
+    drush_print(t("You will destroy data from !target and replace with data from !source.", array('!source' => $db_url_source, '!target' => $db_url_target)));
+    // TODO: actually make the backup if desired.
+    drush_print(t("You might want to make a backup first, using sql_dump command.\n"));
+    if (!drush_confirm(t('Do you really want to continue?'))) {
+      drush_die('Aborting.');
+    }
+  }
+
+  // Get command to export from source.
+  if ($retrieve = drush_sql_dump($db_url_source, FALSE, $skip)) {
+    // Get any arguments to be passed through to the mysqldump.
+    $args = array();
+    if (func_num_args() > 3 && ($args = func_get_args())) {
+      $retrieve .= ' ' . implode(' ', array_slice($args, 3)); // skip standard arguments
+    }
+
+    // Build import command for target.
+    $send = 'mysql' . (DRUSH_VERBOSE ? ' -v' : '');
+    $send .= _drush_sql_get_credentials($db_url_target);
+
+    // Build pipe command and redirect output to the bit bucket.
+    // Redirection prevented loads of SQL from writing to screen.
+    $exec = "$retrieve | $send > /dev/null 2>&1";
+
+    if (DRUSH_VERBOSE) {
+      drush_print(t('Executing: !cmd', array('!cmd' => $exec)));
+    }
+
+    $return = drush_op('system', $exec) !== FALSE;
+  }
+  return $return;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// SQL SERVICE HELPERS
+
+// this sets some globals so please beware.
+function drush_sql_get_path($uri) {
+  $drupal_base_url = parse_url($uri);
+  $_SERVER['HTTP_HOST'] = $drupal_base_url['host'];
+  $_SERVER['PHP_SELF'] = $drupal_base_url['path'].'/index.php';
+  return conf_path();
+}
+
+function _drush_sql_get_scheme($db_url = NULL) {
+  if (is_null($db_url)) {
+    $db_url = $GLOBALS['db_url'];
+  }
+  $url = (object)parse_url($db_url);
+  return ($url->scheme);
+}
+
+function _drush_sql_get_database($db_url = NULL) {
+  if (is_null($db_url)) {
+    $db_url = $GLOBALS['db_url'];
+  }
+  $url = (object)parse_url($db_url);
+  return substr($url->path, 1);
+}
+
+function _drush_sql_get_credentials($db_url = NULL) {
+  if (is_null($db_url)) {
+    $db_url = $GLOBALS['db_url'];
+  }
+
+  // NOTE: this regex could also parse the connection string URL:
+  //   ^([\w]+)://([\w\d_]+):([^@]*)@([\w\d\.\-]*)/([\w\d_]+)$
+
+  $url = (object)parse_url($db_url);
+  $url->user = urldecode($url->user);
+  $url->pass = urldecode($url->pass);
+  $url->host = urldecode($url->host);
+  $url->path = substr(urldecode($url->path), 1); // skip leading '/' character
+
+  switch ($url->scheme) {
+    case 'mysql':
+    case 'mysqli':
+      return ' -h' . $url->host .
+        (!isset($url->port) ? '' : ' -P' . $url->port) .
+        ' -u' . $url->user .
+        (empty($url->pass) ? '' : ' -p' . $url->pass) . ' ' . $url->path;
+    case 'pgsql':
+      drush_die(t('Sorry, psql support not implemented yet.')); // TODO: psql credentials.
+      return;
+    default:
+      drush_die(_drush_sql_get_invalid_url_msg());
+  }
+}
+
+function _drush_sql_get_invalid_url_msg($db_url = NULL) {
+  if (is_null($db_url)) {
+    $db_url = $GLOBALS['db_url'];
+  }
+  return t('Unable to parse DB connection string: `%url\'.', array('%url' => $db_url));
+}
diff -x .git -rNup export/DRUPAL-6--1/includes/sql.README.txt working/DRUPAL-6--1/includes/sql.README.txt
--- export/DRUPAL-6--1/includes/sql.README.txt	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/sql.README.txt	2008-11-23 15:53:59.000000000 +0100
@@ -0,0 +1,24 @@
+// $Id$
+
+DESCRIPTION
+-----------
+
+sql.drush.inc (The Drupal Shell SQL Manager) allows you to interact with the database from the command line.
+
+The three most interesting commands are:
+
+sql query: execute a query against the site database
+
+sql dump: Exports the Drupal DB as SQL using mysqldump or pg_dump.
+
+sql load: Migrate a database dump between two databases. Those databases are specified in your multi-site Drupal.
+
+
+TIPS
+------------
+Using the -l command line option for drush.php, you can easily run SQL commands against any site in your multisite installation.
+
+CREDITS
+------------
+Authored by  Arto Bendiken <http://bendiken.net/>. 
+Maintained by Moshe Weitzman <weitzman AT tejasa DOT com>
diff -x .git -rNup export/DRUPAL-6--1/includes/tools.drush.inc working/DRUPAL-6--1/includes/tools.drush.inc
--- export/DRUPAL-6--1/includes/tools.drush.inc	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/tools.drush.inc	2008-11-23 16:32:34.000000000 +0100
@@ -0,0 +1,149 @@
+<?php
+// $Id$
+
+/**
+ * @file Drush tools
+ */
+
+/**
+ * Implementation of hook_drush_help().
+ */
+function tools_drush_help($section) {
+  switch ($section) {
+    case 'drush:watchdog show':
+      return t("Usage: drush [options] watchdog show <n> <type>\n\nShow the <n> (default 10) most recent watchdog messages. Optionally show only messages of type <type>.");
+    case 'drush:watchdog delete':
+      return t("Usage: drush [options] watchdog delete <type>\n\nDelete all messages of type <type>. Use 'all' to delete all messages, no matter which type they are of.");
+    case 'drush:sync':
+      return t("Usage: drush [options] sync <source> <destination>\n\nRsync the entire drupal directory or a subdirectory to a <destination> using ssh. Excludes .svn directories. Useful for pushing copies of your tree to a staging server, or retrieving a files directory from a remote site. Local paths should be specified relative to Drupal root.");
+    case 'drush:eval':
+      return t("Usage: drush eval <code>\n\nRun arbitrary PHP code in the context of Drupal. For example: drush eval \"variable_set('hello', 'world');\".");
+  }
+}
+
+/**
+ * Implementation of hook_drush_command().
+ */
+function tools_drush_command() {
+  $items['cache clear'] = array(
+    'callback' => 'drush_tools_cache_clear',
+    'description' => 'Clear all caches'
+  );
+  $items['cron'] = array(
+    'callback' => 'drush_tools_cron_run',
+    'description' => 'Run cron'
+  );
+  $items['watchdog show'] = array(
+    'callback' => 'drush_tools_watchdog_show',
+    'description' => 'Show the most recent watchdog log messages'
+  );
+  $items['watchdog delete'] = array(
+    'callback' => 'drush_tools_watchdog_delete',
+    'description' => 'Delete all messages of a certain type'
+  );
+  $items['sync'] = array(
+    'callback' => 'drush_tools_sync',
+    'description' => 'Rsync the Drupal tree to/from another server using ssh'
+  );
+  $items['eval'] = array(
+    'callback' => 'drush_tools_eval',
+    'description' => 'Evaluate a command',
+  );
+  return $items;
+}
+
+function drush_tools_cron_run() {
+  drupal_cron_run();
+  drush_print(t('Cron run successfully.'));
+}
+
+function drush_tools_cache_clear() {
+  drupal_flush_all_caches();
+  drush_print(t('Cache cleared.'));
+}
+
+/**
+ * Push files from or to the local Drupal install using SSH and RSync
+ *
+ * @return void
+ **/
+function drush_tools_sync($source, $destination) {
+  // Local paths are relative to Drupal root
+  if (!strstr($source, ':')) {
+    $source = DRUSH_DRUPAL_ROOT. "/$source";
+  }
+  if (!strstr($destination, ':')) {
+    $destination = DRUSH_DRUPAL_ROOT. "/$destination";
+  }
+
+  // Prompt for confirmation. This is destructive.
+  if (!DRUSH_SIMULATE) {
+    drush_print(t("You will destroy data from !target and replace with data from !source", array('!source' => $source, '!target' => $destination)));
+    if (!drush_confirm(t('Do you really want to continue?'))) {
+      drush_die('Aborting.');
+    }
+  }
+
+  $options = '-az';
+  $exec = "rsync -e ssh $options --exclude \"*.svn*\" $source $destination";
+  if (DRUSH_VERBOSE) {
+    // the drush_op() will be verbose about the command that gets executed.
+    $options .= 'v';
+  }
+
+  return drush_op('system', $exec) !== FALSE;
+}
+/**
+ * Displays the most recent watchdog log messages (default: 10 messages).
+ */
+function drush_tools_watchdog_show($limit = 10, $type = NULL) {
+  $severities = array(WATCHDOG_NOTICE => t('notice'), WATCHDOG_WARNING => t('warning'), WATCHDOG_ERROR => t('error'));
+
+  $sql = 'SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid ORDER BY w.wid DESC';
+  $result = (!empty($type) ?
+             db_query_range($sql . " WHERE w.type = '%s'", $type, 0, (int)$limit) :
+             db_query_range($sql, 0, (int)$limit));
+
+
+  $rows = array();
+  module_load_include('inc', 'dblog', 'dblog.admin');
+  while ($watchdog = db_fetch_object($result)) {
+    $rows[] = array(
+      format_date($watchdog->timestamp, 'small'),
+      $severities[$watchdog->severity],
+      t($watchdog->type),
+      truncate_utf8(decode_entities(strtr($watchdog->message, unserialize($watchdog->variables))), 68, FALSE, FALSE),
+      theme('username', $watchdog),
+    );
+  }
+
+  if (count($rows) == 0) {
+    drush_die(t('No log messages available.'));
+  }
+  drush_verbose(t('Last !count watchdog log messages:', array('!count' => $limit)));
+
+  array_unshift($rows, array(t('Date'), t('Severity'), t('Type'), t('Message'), t('User')));
+  drush_print_table($rows, 2, TRUE);
+}
+
+/**
+ * Deletes all log messages of a certain type from the watchdog log
+ * (default: all).
+ */
+function drush_tools_watchdog_delete($type = NULL) {
+  if ($type == "all") {
+    drush_op('db_query', 'DELETE FROM {watchdog}'); // indiscriminately delete all
+    drush_print(t('Deleted !n rows.', array('!n' => db_affected_rows())));
+  }
+  elseif (!empty($type)) {
+    drush_op('db_query', 'DELETE FROM {watchdog} WHERE type = \'%s\'', $type);
+    drush_print(t('Deleted !n rows.', array('!n' => db_affected_rows())));
+  }
+  else {
+    drush_print(t('Please specify a message type, or "all" to delete all messages.'));
+  }
+}
+
+function drush_tools_eval($command) {
+  eval($command);
+}
diff -x .git -rNup export/DRUPAL-6--1/includes/tools.README.txt working/DRUPAL-6--1/includes/tools.README.txt
--- export/DRUPAL-6--1/includes/tools.README.txt	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/includes/tools.README.txt	2008-11-23 15:54:03.000000000 +0100
@@ -0,0 +1,15 @@
+// $Id$
+
+DESCRIPTION
+-----------
+tools.drush.inc provides several useful commands for site developers and administrators.
+
+Run 'drush help' to see a list of available commands, and 'drush help <command>' for command-specific help.
+
+REQUIREMENTS
+------------
+drush
+
+------------
+Written by Franz Heinzmann (frando) <http://unbiskant.org>.
+Expanded by Moshe Weitzman - http://drupal.org/moshe
diff -x .git -rNup export/DRUPAL-6--1/module.inc working/DRUPAL-6--1/module.inc
--- export/DRUPAL-6--1/module.inc	1970-01-01 01:00:00.000000000 +0100
+++ working/DRUPAL-6--1/module.inc	2008-11-23 16:30:34.000000000 +0100
@@ -0,0 +1,200 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * The drush module engine.
+ *
+ * Since drush can be invoked independently of a proper Drupal
+ * installation and commands may operate across sites, a separate
+ * module engine is needed.
+ *
+ * It mimics the Drupal module engine in order to economize on 
+ * concepts and to make developing commands as familiar as possible
+ * to traditional Drupal module development.
+ */
+
+/**
+ * Invoke a hook in all available modules that implement it.
+ *
+ * @param $hook
+ *   The name of the hook to invoke.
+ * @param ...
+ *   Arguments to pass to the hook.
+ * @return
+ *   An array of return values of the hook implementations. If modules return
+ *   arrays from their implementations, those are merged into one array.
+ */
+function drush_module_invoke_all() {
+  $args = func_get_args();
+  $hook = $args[0];
+  unset($args[0]);
+  $return = array();
+  foreach (drush_module_implements($hook) as $module) {
+    $function = $module .'_'. $hook;
+    $result = call_user_func_array($function, $args);
+    if (isset($result) && is_array($result)) {
+      $return = array_merge_recursive($return, $result);
+    }
+    else if (isset($result)) {
+      $return[] = $result;
+    }
+  }
+  return $return;
+}
+
+/**
+ * Determine which modules are implementing a hook.
+ *
+ * @param $hook
+ *   The name of the hook (e.g. "drush_help" or "drush_command").
+ *
+ * @return
+ *   An array with the names of the modules which are implementing this hook.
+ */
+function drush_module_implements($hook) {
+  static $implementations;
+
+  if (!isset($implementations[$hook])) {
+    $implementations[$hook] = array();
+    $list = drush_module_list();
+    foreach ($list as $module) {
+      if (drush_module_hook($module, $hook)) {
+        $implementations[$hook][] = $module;
+      }
+    }
+
+    // If Drupal has been bootstrapped, we scan enabled modules
+    // for drush commands as well.
+    if (function_exists('module_list') && function_exists('module_hook')) {
+      $list = module_list();
+      foreach ($list as $module) {
+        if (module_hook($module, $hook)) {
+          $implementations[$hook][] = $module;
+        }
+      }
+    }
+    
+  }
+  return (array)$implementations[$hook];
+}
+
+/**
+ * Collect a list of all available drush modules.
+ * 
+ * Scans the following paths for drush modules:
+ *
+ * - The ".drush" folder in the users HOME folder.
+ * - The "/path/to/drush/includes" folder.
+ * - Folders listed in the 'include' option (see example.drushrc.php).
+ * - The current Drupal installation, if any.
+ *
+ * A drush module is a file that matches "*.drush.inc".
+ * 
+ * @see drush_scan_directory
+ *
+ * @return
+ *   An associative array whose keys and values are the names of all available
+ *   modules.
+ */
+function drush_module_list() {
+  static $list = array();
+  if (empty($list)) {
+    $dirs = array();
+    if (!empty($_SERVER['HOME']) && file_exists($_SERVER['HOME'] . '/.drush')) {
+      $dirs[] = $_SERVER['HOME'] . '/.drush';
+    }
+    $dirs[] = dirname(__FILE__) . '/includes';
+    if ($include = drush_get_option(array('i', 'include'), FALSE)) {
+      $dirs = array_merge($dirs, explode(":", $include));
+    }
+    foreach ($dirs as $dir) {
+      $files = drush_scan_directory($dir, '\.drush\.inc$');
+      foreach ($files as $filename => $info) {
+        require_once($filename);
+        $list[] = basename($filename, '.drush.inc');
+      }
+    }
+  }
+  return $list;
+}
+
+/**
+ * Determine whether a module implements a hook.
+ *
+ * @param $module
+ *   The name of the module (without the .module extension).
+ * @param $hook
+ *   The name of the hook (e.g. "help" or "menu").
+ * @return
+ *   TRUE if the the hook is implemented.
+ */
+function drush_module_hook($module, $hook) {
+  return function_exists($module .'_'. $hook);
+}
+
+
+/**
+ * Finds all files that match a given mask in a given directory.
+ * Directories and files beginning with a period are excluded; this
+ * prevents hidden files and directories (such as SVN working directories
+ * and GIT repositories) from being scanned.
+ *
+ * @param $dir
+ *   The base directory for the scan, without trailing slash.
+ * @param $mask
+ *   The regular expression of the files to find.
+ * @param $nomask
+ *   An array of files/directories to ignore.
+ * @param $callback
+ *   The callback function to call for each match.
+ * @param $recurse
+ *   When TRUE, the directory scan will recurse the entire tree
+ *   starting at the provided directory.
+ * @param $key
+ *   The key to be used for the returned array of files. Possible
+ *   values are "filename", for the path starting with $dir,
+ *   "basename", for the basename of the file, and "name" for the name
+ *   of the file without an extension.
+ * @param $min_depth
+ *   Minimum depth of directories to return files from.
+ * @param $depth
+ *   Current depth of recursion. This parameter is only used internally and should not be passed.
+ *
+ * @return
+ *   An associative array (keyed on the provided key) of objects with
+ *   "path", "basename", and "name" members corresponding to the
+ *   matching files.
+ */
+function drush_scan_directory($dir, $mask, $nomask = array('.', '..', 'CVS'), $callback = 0, $recurse = TRUE, $key = 'filename', $min_depth = 0, $depth = 0) {
+  $key = (in_array($key, array('filename', 'basename', 'name')) ? $key : 'filename');
+  $files = array();
+
+  if (is_dir($dir) && $handle = opendir($dir)) {
+    while (FALSE !== ($file = readdir($handle))) {
+      if (!in_array($file, $nomask) && $file[0] != '.') {
+        if (is_dir("$dir/$file") && $recurse) {
+          // Give priority to files in this folder by merging them in after any subdirectory files.
+          $files = array_merge(drush_scan_directory("$dir/$file", $mask, $nomask, $callback, $recurse, $key, $min_depth, $depth + 1), $files);
+        }
+        elseif ($depth >= $min_depth && ereg($mask, $file)) {
+          // Always use this match over anything already set in $files with the same $$key.
+          $filename = "$dir/$file";
+          $basename = basename($file);
+          $name = substr($basename, 0, strrpos($basename, '.'));
+          $files[$$key] = new stdClass();
+          $files[$$key]->filename = $filename;
+          $files[$$key]->basename = $basename;
+          $files[$$key]->name = $name;
+          if ($callback) {
+            $callback($filename);
+          }
+        }
+      }
+    }
+
+    closedir($handle);
+  }
+
+  return $files;
+}
diff -x .git -rNup export/DRUPAL-6--1/README.txt working/DRUPAL-6--1/README.txt
--- export/DRUPAL-6--1/README.txt	2008-03-26 04:03:56.000000000 +0100
+++ working/DRUPAL-6--1/README.txt	2008-11-24 00:51:21.000000000 +0100
@@ -16,26 +16,24 @@ this download. See Package Manager, SQL 
 INSTALLATION
 ------------
 For Linux/Unix/Mac:
-  1. Untar the tarball into your module directory (sites/all/modules)
-  2. Enable drush.module and any submodules you want to use. You must enable the CVS or wget modules
-     if you want to install modules (you do).
-  3. (optional, but recommended:) To ease the use of drush,
+  1. Untar the tarball into a convenient folder (/path/to/drush)
+  2. (optional, but recommended:) To ease the use of drush,
      - create a link to drush.php in a directory that is in your $PATH, e.g.:
-       $ ln /path/to/drush.php /usr/bin/drush
+       $ ln /path/to/drush/drush.php /usr/bin/drush
      OR
      - create an alias to drush.php:
-       $ alias drush='php modules/drush/drush.php'
+       $ alias drush='php /path/to/drush/drush.php'
        (this goes into .profile or .bash_aliases in your home folder)
 
-  4. Start using drush by running "drush" from your Drupal root directory.
+  3. Start using drush by running "drush" from your Drupal root directory.
+
+     (or, if you did not follow step 3, by running "/path/to/drush/drush.php"
+      or navigating to /path/to/drush and running "./drush.php" )
 
-     (or, if you did not follow step 3, by running "./sites/all/modules/drush.php"
-      or navigating to sites/all/modules/drush and running "./drush.php" )
-      
     If you have troubles, try using the -l and -r flags when invoking drush.php. See below.
 
 For Windows (experimental!):
-  - Follow steps 1 and 2. Use drush by navigating to sites/all/modules/drush
+  - Follow step 1. Use drush by navigating to /path/to/drush
     and running 'drush.bat'.
   - Whenever the documentation or the help text refers to
    'drush [option] <command>' or something similar, 'drush' has to be replaced
@@ -54,18 +52,44 @@ Use the 'help' command to get a list of 
 
   $ drush help
 
-Please note that drush requires a working drupal setup in order to function
-correctly. So for multisite installations, you might need to use the -l or other command line 
-options just to get the help command to work:
+For multisite installations, you might need to use the -l or other command line
+options just to get drush to work:
 
   $ drush -l http://association.drupal.org/drupal help
 
 Related Options:
-  -r <path>, --root=<path>      Drupal root directory to use (default: current directory)            
+  -r <path>, --root=<path>      Drupal root directory to use (default: current directory)
   -l <uri> , --uri=<uri>        URI of the drupal site to use (only needed in multisite environments)
   -v, --verbose                 Display all available output
-  
-If you get tired of typing options all the time, you can add them to your drush.php alias or create a drushrc.php file. These provide additional options for your drush call. They provide great flexibility for a multi-site installation, for example. See example.drushrc.php.                                         
+
+Other options:
+  -i <path>, --include=<path>   Path to folder containing additional drush commands
+
+If you get tired of typing options all the time, you can add them to your drush.php alias or
+create a drushrc.php file. These provide additional options for your drush call. They provide
+great flexibility for a multi-site installation, for example. See example.drushrc.php.
+
+COMMANDS
+--------
+Drush ships with a number of commands (see above), but you can easily write
+your own. In fact, writing a drush command is no harder that writing simple
+Drupal extensions, since drush "modules" closely follows the structure of
+ordinary Drupal modules.
+
+See example.drush.inc for details on the internals of a drush command
+module.
+
+You can put your drush command modules in a number of places:
+
+  - In a .drush folder in your HOME folder. Note, that you have
+    to make the .drush folder yourself.
+  - Along with one of your existing modules. If your command is
+    related to an existing module, this is the preferred option.
+  - In a folder specified with the include option (see above).
+  - In /path/to/drush/includes (not a Good Thing, but it would work).
+
+In any case, it is important that you append it with ".drush.inc", so
+that drush can find it.
 
 REQUIREMENTS
 ------------
