? .drush-cache.info
? includes/table.inc
Index: commands/core/core.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/core.drush.inc,v
retrieving revision 1.156
diff -u -p -r1.156 core.drush.inc
--- commands/core/core.drush.inc	29 Dec 2010 07:16:33 -0000	1.156
+++ commands/core/core.drush.inc	30 Dec 2010 04:57:57 -0000
@@ -259,7 +259,9 @@ function drush_core_updatedb() {
   }
 
   drush_include_engine('drupal', 'update', drush_drupal_major_version());
-  update_main();
+  if (update_main() === FALSE) {
+    return FALSE;
+  }
 
   if (drush_drupal_major_version() <= 6) {
     // Clear all caches. We just performed major surgery.
Index: commands/core/field.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/field.drush.inc,v
retrieving revision 1.8
diff -u -p -r1.8 field.drush.inc
--- commands/core/field.drush.inc	27 Dec 2010 04:19:23 -0000	1.8
+++ commands/core/field.drush.inc	30 Dec 2010 04:57:58 -0000
@@ -145,7 +145,7 @@ function drush_field_delete($field_name)
     }
     else {
       if (!drush_confirm(dt('Do you want to delete the %field_name field?', array('%field_name' => $field_name)))) {
-        return drush_log(dt('Aborting.'));
+        return drush_user_abort();
       }
     }
   }
@@ -271,4 +271,4 @@ function drush_field_get_entity_from_bun
       }
     }
   }
-}
\ No newline at end of file
+}
Index: commands/core/rsync.core.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/rsync.core.inc,v
retrieving revision 1.9
diff -u -p -r1.9 rsync.core.inc
--- commands/core/rsync.core.inc	8 Dec 2010 14:58:47 -0000	1.9
+++ commands/core/rsync.core.inc	30 Dec 2010 04:57:58 -0000
@@ -47,7 +47,7 @@ function drush_core_rsync($source, $dest
       drush_print(dt("You will destroy data from !target and replace with data from !source", array('!source' => $source_path, '!target' => $destination_path)));
       if (!drush_confirm(dt('Do you really want to continue?'))) {
         // was: return drush_set_error('CORE_SYNC_ABORT', 'Aborting.');
-        drush_user_abort();
+        return drush_user_abort();
       }
     }
 
Index: commands/core/search.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/search.drush.inc,v
retrieving revision 1.6
diff -u -p -r1.6 search.drush.inc
--- commands/core/search.drush.inc	2 Apr 2010 04:14:49 -0000	1.6
+++ commands/core/search.drush.inc	30 Dec 2010 04:57:58 -0000
@@ -38,7 +38,7 @@ function _drush_core_search_status() {
 function drush_core_search_index() {
   drush_print(dt("Building the index may take a long time."));
   if (!drush_confirm(dt('Do you really want to continue?'))) {
-    return drush_set_error('CORE_SEARCH_REBUILD_ABORT', 'Aborting.');
+    return drush_user_abort();
   }
   drush_op('_drush_core_search_index');
   drush_log(dt('The search index has been built.'), 'ok');
@@ -70,7 +70,7 @@ function drush_core_search_reindex() {
     drush_print(dt("Rebuilding the index may take a long time."));
   }
   if (!drush_confirm(dt('Do you really want to continue?'))) {
-    return drush_set_error('CORE_SEARCH_REINDEX_ABORT', 'Aborting.');
+    return drush_user_abort();
   }
 
   if (drush_drupal_major_version() >= 7) {
Index: commands/core/site_install.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/site_install.drush.inc,v
retrieving revision 1.17
diff -u -p -r1.17 site_install.drush.inc
--- commands/core/site_install.drush.inc	23 Dec 2010 02:07:49 -0000	1.17
+++ commands/core/site_install.drush.inc	30 Dec 2010 04:57:58 -0000
@@ -27,7 +27,7 @@ function drush_core_pre_site_install() {
   $msg[] = dt("DROP your '@db' database and then CREATE a new one.", array('@db' => $db_spec['database']));
 
   if (!drush_confirm(dt('You are about to ') . implode(dt(' and '), $msg) . ' Do you want to continue?')) {
-    return drush_set_error('CORE_SITE_INSTALL_ABORT', 'Aborting.');
+    return drush_user_abort();
   }
 
   // Can't install without sites directory and settings.php.
Index: commands/core/watchdog.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/watchdog.drush.inc,v
retrieving revision 1.14
diff -u -p -r1.14 watchdog.drush.inc
--- commands/core/watchdog.drush.inc	24 Nov 2010 07:50:35 -0000	1.14
+++ commands/core/watchdog.drush.inc	30 Dec 2010 04:57:58 -0000
@@ -85,7 +85,7 @@ function drush_core_watchdog_list() {
   }
   $option = drush_choice($options, dt('Select a message type or severity level.'));
   if ($option === FALSE) {
-    return drush_log(dt('Aborting.'));
+    return drush_user_abort();
   }
   $ntypes = count($types);
   if ($option < $ntypes) {
@@ -263,7 +263,7 @@ function drush_core_watchdog_delete($arg
   if ($arg == 'all') {
     drush_print(dt('All watchdog messages will be deleted.'));
     if (!drush_confirm(dt('Do you really want to continue?'))) {
-      return drush_log(dt('Aborting.'));
+      return drush_user_abort();
     }
     drush_db_delete('watchdog');
     drush_log(dt('All watchdog messages have been deleted.'), 'ok');
@@ -271,7 +271,7 @@ function drush_core_watchdog_delete($arg
   else if (is_numeric($arg)) {
     drush_print(dt('Watchdog message #!wid will be deleted.', array('!wid' => $arg)));
     if(!drush_confirm(dt('Do you really want to continue?'))) {
-      return drush_log(dt('Aborting.'));
+      return drush_user_abort();
     }
     $affected_rows = drush_db_delete('watchdog', 'wid=:wid', array(':wid' => $arg));
     if ($affected_rows == 1) {
@@ -289,11 +289,12 @@ function drush_core_watchdog_delete($arg
     }
     $where = core_watchdog_query($type, $severity, $arg, 'OR');
     if ($where === FALSE) {
-      return drush_log(dt('Aborting.'), 'error');
+      // Drush set error was already called by core_watchdog_query
+      return FALSE;
     }
     drush_print(dt('All messages with !where will be deleted.', array('!where' => preg_replace("/message LIKE %$arg%/", "message body containing '$arg'" , strtr($where['where'], $where['args'])))));
     if(!drush_confirm(dt('Do you really want to continue?'))) {
-      return drush_log(dt('Aborting.'));
+      return drush_user_abort();
     }
     $affected_rows = drush_db_delete('watchdog', $where['where'], $where['args']);
     drush_log(dt('!affected_rows watchdog messages have been deleted.', array('!affected_rows' => $affected_rows)), 'ok');
@@ -321,7 +322,7 @@ function core_watchdog_query($type = NUL
     $types = core_watchdog_message_types();
     if (array_search($type, $types) === FALSE) {
       $msg = "Unrecognized message type: !type.\nRecognized types are: !types.";
-      return drush_set_error(dt($msg, array('!type' => $type, '!types' => implode(', ', $types))));
+      return drush_set_error('WATCHDOG_UNRECOGNIZED_TYPE', dt($msg, array('!type' => $type, '!types' => implode(', ', $types))));
     }
     $conditions[] = "type = :type";
     $args[':type'] = $type;
Index: commands/core/drupal/update_5.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/drupal/update_5.inc,v
retrieving revision 1.9
diff -u -p -r1.9 update_5.inc
--- commands/core/drupal/update_5.inc	10 Nov 2010 02:55:41 -0000	1.9
+++ commands/core/drupal/update_5.inc	30 Dec 2010 04:57:58 -0000
@@ -80,7 +80,7 @@ function update_main() {
       }
     }
     if (!drush_confirm(dt('Do you wish to run all pending updates?'))) {
-      drush_user_abort();
+      return drush_user_abort();
     }
 
     $update_results = array();
Index: commands/core/drupal/update_6.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/drupal/update_6.inc,v
retrieving revision 1.19
diff -u -p -r1.19 update_6.inc
--- commands/core/drupal/update_6.inc	1 Dec 2010 15:53:15 -0000	1.19
+++ commands/core/drupal/update_6.inc	30 Dec 2010 04:57:59 -0000
@@ -403,7 +403,7 @@ function update_main() {
       }
     }
     if (!drush_confirm(dt('Do you wish to run all pending updates?'))) {
-      drush_user_abort();
+      return drush_user_abort();
     }
     // Proceed with running all pending updates.
     $operations = array();
Index: commands/core/drupal/update_7.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/drupal/update_7.inc,v
retrieving revision 1.29
diff -u -p -r1.29 update_7.inc
--- commands/core/drupal/update_7.inc	10 Nov 2010 02:55:41 -0000	1.29
+++ commands/core/drupal/update_7.inc	30 Dec 2010 04:57:59 -0000
@@ -234,7 +234,7 @@ function update_main() {
     }
 
     if (!drush_confirm(dt('Do you wish to run all pending updates?'))) {
-      drush_user_abort();
+      return drush_user_abort();
     }
 
     drush_update_batch($start);
Index: commands/pm/pm.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/pm/pm.drush.inc,v
retrieving revision 1.186
diff -u -p -r1.186 pm.drush.inc
--- commands/pm/pm.drush.inc	27 Dec 2010 15:46:16 -0000	1.186
+++ commands/pm/pm.drush.inc	30 Dec 2010 04:58:01 -0000
@@ -598,7 +598,7 @@ function drush_pm_enable() {
   else {
     drush_print(dt('The following extensions will be enabled: !extensions', array('!extensions' => implode(', ', $extensions))));
     if(!drush_confirm(dt('Do you really want to continue?'))) {
-      return drush_log(dt('Aborting.'));
+      return drush_user_abort();
     }
   }
 
@@ -712,7 +712,7 @@ function drush_pm_disable() {
   else {
     drush_print(dt('The following extensions will be disabled: !extensions', array('!extensions' => implode(', ', $extensions))));
     if(!drush_confirm(dt('Do you really want to continue?'))) {
-      return drush_log(dt('Aborting.'));
+      return drush_user_abort();
     }
   }
 
@@ -951,7 +951,7 @@ function drush_pm_uninstall() {
   else {
     drush_print(dt('The following modules will be uninstalled: !modules', array('!modules' => implode(', ', $modules))));
     if(!drush_confirm(dt('Do you really want to continue?'))) {
-      return drush_log(dt('Aborting.'));
+      return drush_user_abort();
     }
   }
 
@@ -2155,7 +2155,7 @@ function drush_pm_download() {
     // Check if install location already exists.
     if (is_dir($request['project_install_location'])) {
       if (!drush_confirm(dt('Install location !location already exists. Do you want to overwrite it?', array('!location' => $request['project_install_location'])))) {
-        drush_log(dt("Abort installation of !project to !dest.", array('!project' => $request['name'], '!dest' => $request['project_install_location'])), 'warning');
+        drush_log(dt("Skip installation of !project to !dest.", array('!project' => $request['name'], '!dest' => $request['project_install_location'])), 'warning');
         continue;
       }
     }
Index: commands/pm/updatecode.pm.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/pm/updatecode.pm.inc,v
retrieving revision 1.36
diff -u -p -r1.36 updatecode.pm.inc
--- commands/pm/updatecode.pm.inc	22 Dec 2010 23:13:10 -0000	1.36
+++ commands/pm/updatecode.pm.inc	30 Dec 2010 04:58:01 -0000
@@ -224,7 +224,7 @@ function _pm_update_core(&$project, $tmp
     _drush_pm_releasenotes(array('drupal'), TRUE, $tmpfile);
   }
   if(!drush_confirm(dt('Do you really want to continue?'))) {
-    drush_user_abort();
+    return drush_user_abort();
   }
 
   // We need write permission on $drupal_root.
@@ -364,7 +364,7 @@ function pm_update_packages($update_info
     drush_print(dt('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(dt('Do you really want to continue with the update process?'))) {
-    drush_user_abort();
+    return drush_user_abort();
   }
 
   // Now we start the actual updating.
Index: commands/sql/sql.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/sql/sql.drush.inc,v
retrieving revision 1.87
diff -u -p -r1.87 sql.drush.inc
--- commands/sql/sql.drush.inc	29 Dec 2010 17:23:14 -0000	1.87
+++ commands/sql/sql.drush.inc	30 Dec 2010 04:58:02 -0000
@@ -455,7 +455,7 @@ function _drush_sql_query($query, $db_sp
 
 function drush_sql_drop() {
   if (!drush_confirm(dt('Do you really want to drop all tables?'))) {
-    drush_user_abort();
+    return drush_user_abort();
   }
   _drush_sql_drop();
 }
Index: commands/sql/sync.sql.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/sql/sync.sql.inc,v
retrieving revision 1.46
diff -u -p -r1.46 sync.sql.inc
--- commands/sql/sync.sql.inc	24 Dec 2010 05:10:29 -0000	1.46
+++ commands/sql/sync.sql.inc	30 Dec 2010 04:58:02 -0000
@@ -283,14 +283,14 @@ function drush_sql_sync($source = NULL, 
       }
       else if (drush_get_option('deferred-sanitization', FALSE) && !drush_get_option('confirm-sanitizations', FALSE)) {
         drush_print();
-	drush_print("WARNING: --sanitize was specified, but deferred (e.g. the source site is remote).  The sanitization operations will be determined after the database is copied to the local system and will be run without further confirmation.  Run with --confirm-sanitizations to force confirmation after the sync.");
+        drush_print("WARNING: --sanitize was specified, but deferred (e.g. the source site is remote).  The sanitization operations will be determined after the database is copied to the local system and will be run without further confirmation.  Run with --confirm-sanitizations to force confirmation after the sync.");
       }
 
       // TODO: actually make the backup if desired.
       drush_print();
       drush_print(dt("You might want to make a backup first, using the sql-dump command.\n"));
       if (!drush_confirm(dt('Do you really want to continue?'))) {
-        drush_user_abort();
+        return drush_user_abort();
       }
     }
 
@@ -315,7 +315,7 @@ function drush_sql_sync($source = NULL, 
         }
         drush_set_option('result-file', $source_intermediate);
         list($dump_exec, $dump_file) = drush_sql_build_dump_command($table_selection, $source_db_url);
-	$dump_exec .= $mv_intermediate;
+        $dump_exec .= $mv_intermediate;
         if (isset($cache) && !$source_db_url['dump-is-temp']) {
           // Inject some bash commands to remotely test the modification date of the target file
           // if the cache option is set.
@@ -430,10 +430,10 @@ function drush_sql_sync($source = NULL, 
       // This presumes an important precondition, that the code
       // files were sync'ed before the database was sync'ed.
       if (drush_get_option('deferred-sanitization', FALSE) && (drush_has_boostrapped(DRUSH_BOOTSTRAP_DRUPAL_SITE) == FALSE)) {
-	$bootstrapped = drush_bootstrap_max_to_sitealias($destination_settings);
-	if ($bootstrapped) {
-	  drush_command_invoke_all('drush_sql_sync_sanitize', $destination);
-	}
+        $bootstrapped = drush_bootstrap_max_to_sitealias($destination_settings);
+        if ($bootstrapped) {
+          drush_command_invoke_all('drush_sql_sync_sanitize', $destination);
+        }
       }
     }
   }
@@ -455,16 +455,19 @@ function drush_sql_post_sql_sync($source
     // confirm unless --confirm-sanitizations is specified.
     if (drush_get_option('deferred-sanitization', FALSE) || drush_get_option('confirm-sanitizations', FALSE)) {
       if (!drush_get_context('DRUSH_SIMULATE')) {
-	$messages = _drush_sql_get_post_sync_messages();
-	if ($messages) {
+        $messages = _drush_sql_get_post_sync_messages();
+        if ($messages) {
           drush_print();
           drush_print($messages);
           if (drush_get_option('confirm-sanitizations', FALSE)) {
             if (!drush_confirm(dt('Do you really want to sanitize?'))) {
-              drush_user_abort('Aborting; sql-sync completed, but sanitizations skipped.');
-	    }
-	  }
-	}
+              // Do not abort or return FALSE; that would trigger a rollback.
+              // Just skip the sanitizations and signal that all is ok.
+              drush_log(dt('Sanitizations skipped.'), 'ok');
+              return TRUE;
+            }
+          }
+        }
       }
     }
     
Index: includes/command.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/includes/command.inc,v
retrieving revision 1.101
diff -u -p -r1.101 command.inc
--- includes/command.inc	29 Dec 2010 16:19:12 -0000	1.101
+++ includes/command.inc	30 Dec 2010 04:58:03 -0000
@@ -107,9 +107,9 @@ function drush_invoke($command) {
         $all_available_hooks[] = $func . ' [*]';
         $available_rollbacks[] = $func . '_rollback';
         $completed[] = $func;
-        call_user_func_array($func, $args);
+        $result = call_user_func_array($func, $args);
         _drush_log_drupal_messages();
-        if (drush_get_error()) {
+        if (drush_get_error() || ($result === FALSE)) {
           $rollback = TRUE;
           // break out of the foreach variations and foreach list
           break 2;
@@ -141,7 +141,7 @@ function drush_invoke($command) {
       if (function_exists($rb_func)) {
         call_user_func_array($rb_func, $args);
         _drush_log_drupal_messages();
-        drush_log("Changes for $func module have been rolled back.", 'rollback');
+        drush_log(dt("Changes for $func module have been rolled back."), 'rollback');
       }
     }
   }
@@ -504,10 +504,10 @@ function drush_process_bootstrap_to_firs
       $shifted_alias = $arguments[$shift_alias_pos];
       $alias_record = drush_sitealias_get_record($shifted_alias);
       if (!empty($alias_record)) {
-	// Move the alias we shifted from its current position
-	// in the argument list to the front of the list
-	array_splice($arguments, $shift_alias_pos, 1);
-	array_unshift($arguments, $shifted_alias);
+        // Move the alias we shifted from its current position
+        // in the argument list to the front of the list
+        array_splice($arguments, $shift_alias_pos, 1);
+        array_unshift($arguments, $shifted_alias);
       }
     }
   }
Index: includes/drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/includes/drush.inc,v
retrieving revision 1.178
diff -u -p -r1.178 drush.inc
--- includes/drush.inc	27 Dec 2010 03:33:33 -0000	1.178
+++ includes/drush.inc	30 Dec 2010 04:58:04 -0000
@@ -335,14 +335,6 @@ function drush_die($msg = NULL, $status 
   die($msg ? "drush: $msg\n" : '');
 }
 
-/**
- * Exit due to user declining a confirmation prompt.
- */
-function drush_user_abort($msg = NULL, $status = NULL) {
-  drush_set_context('DRUSH_USER_ABORT', TRUE);
-  drush_die($msg ? $msg : 'Aborting.', $status);
-}
-
 /*
  * Check to see if the provided line is a "#!/usr/bin/env drush"
  * "shebang" script line.
@@ -1677,7 +1669,7 @@ function drush_remote_command() {
       }
 
       if (drush_confirm('Continue? ') === FALSE) {
-         drush_user_abort();
+        return drush_user_abort();
       }
     }
     $command = array_shift($args);
@@ -1754,7 +1746,7 @@ function drush_do_multiple_command($comm
       }
 
       if (drush_confirm('Continue? ') === FALSE) {
-         drush_user_abort();
+         return drush_user_abort();
       }
     }
 
@@ -1936,6 +1928,7 @@ function _drush_print_log($entry) {
   $return = TRUE;
   switch ($entry['type']) {
     case 'warning' :
+    case 'cancel' :
       $type_msg = sprintf($yellow, $entry['type']);
       break;
     case 'failed' :
@@ -2279,6 +2272,17 @@ function drush_cmp_error($error) {
 }
 
 /**
+ * Exit due to user declining a confirmation prompt.
+ *
+ * Usage:  return drush_user_abort();
+ */
+function drush_user_abort($msg = NULL) {
+  drush_set_context('DRUSH_USER_ABORT', TRUE);
+  drush_log($msg ? $msg : dt('Aborting.'), 'cancel');
+  return FALSE;
+}
+
+/**
  * Turn PHP error handling off.
  *
  * This is commonly used while bootstrapping Drupal for install
