? .patch
? drush.sh
? fast.patch
? machine.patch
? timing.patch
? tmp.patch
? tmp.patch.patch
? updatedb.patch
? commands/.patch
? commands/pm/.patch
Index: commands/core/core.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/core.drush.inc,v
retrieving revision 1.23
diff -u -F^f -p -r1.23 core.drush.inc
--- commands/core/core.drush.inc	3 May 2009 03:45:34 -0000	1.23
+++ commands/core/core.drush.inc	5 May 2009 05:31:28 -0000
@@ -152,15 +152,18 @@ function core_help() {
         foreach($commands as $key => $command) {
           if (!array_key_exists($key, $printed_rows) && empty($commands[$key]['bootstrap_errors'])) {
             $rows[$key] = array(sprintf("%-20s", $key), $commands[$key]['description']);
+            $machine[] = $key;
           }
         }
         drush_print_table($rows, 2);
         $printed_rows = array_merge($printed_rows, $rows);
+        
       }
       else {
         break; 
       }
     }
+    drush_log($machine, 'machine');
     return;
   }
   else {
Index: commands/pm/pm.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/pm/pm.drush.inc,v
retrieving revision 1.27
diff -u -F^f -p -r1.27 pm.drush.inc
--- commands/pm/pm.drush.inc	3 May 2009 02:46:08 -0000	1.27
+++ commands/pm/pm.drush.inc	5 May 2009 05:31:28 -0000
@@ -270,11 +270,15 @@ function pm_module_status($form) {
     $enabled = dt('Disabled');
     if (array_search($module, $form['status']['#default_value']) !== FALSE) {
       $enabled = dt('Enabled');
+      $machine[] = $module;
     }
     $info = $form['validation_modules']['#value'][$module]->info;
     $rows[] = array($info['name'] . ' (' . $module . ')', $enabled, truncate_utf8($info['description'], 60, FALSE, TRUE));
   }
   drush_print_table($rows, 2, TRUE);
+  
+  // Scripts may use this machine parseable version.
+  drush_log($machine, 'machine');
 }
 
 /**
Index: includes/backend.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/includes/backend.inc,v
retrieving revision 1.12
diff -u -F^f -p -r1.12 backend.inc
--- includes/backend.inc	3 May 2009 03:45:35 -0000	1.12
+++ includes/backend.inc	5 May 2009 05:31:29 -0000
@@ -69,6 +69,9 @@ function drush_backend_output() {
   // The error log is a more specific version of the log, and may be used by calling
   // scripts to check for specific errors that have occurred.
   $data['error_log'] = drush_get_error_log();
+  // The machine log is a more specific version of the log, and may be used by calling
+  // scripts when they need machine parseable output.
+  $data['machine_log'] = drush_get_machine_log();
 
   // Return the options that were set at the end of the process.
   $data['context']  = drush_get_merged_options();
Index: includes/drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/includes/drush.inc,v
retrieving revision 1.30
diff -u -F^f -p -r1.30 drush.inc
--- includes/drush.inc	3 May 2009 03:45:35 -0000	1.30
+++ includes/drush.inc	5 May 2009 05:31:29 -0000
@@ -552,7 +552,7 @@ function _drush_get_table_column_widths(
  * @param message
  *   String containing the message to be logged.
  * @param type
- *   The type of message to be logged. Common types are 'warning', 'error', 'success' and 'notice'.
+ *   The type of message to be logged. Common types are 'warning', 'error', 'success', 'notice', 'machine'.
  *   A type of 'failed' can also be supplied to flag as an 'error'.
  *   A type of 'ok' or 'completed' can also be supplied to flag as a 'success'
  *   All other types of messages will be assumed to be notices.
@@ -803,6 +803,24 @@ function drush_get_error_log() {
 }
 
 /**
+ * Return the current list of machine readable entries from the context log.
+ *
+ * @return
+ *   An associative array of machine messages indexed by the type of message.
+ */
+function drush_get_machine_log() {
+  $machine = array();
+  $log = drush_get_log();
+  foreach ($log as $key => $item) {
+    if ($item['type'] == 'machine') {
+      $machine[] = $item;
+    }
+  }
+  return $machine;
+}
+
+
+/**
  * Check if a specific error status has been set.
  *
  * @param error
