$errors))); } } else { return drush_set_error('DRUSH_PM_BZR_NOT_FOUND', dt("Drush was unable to get the bzr status. Check that you have Bazaar \ninstalled and that the site is a Bazaar working copy.\nThe specific errors are below:\n!errors", array('!errors' => implode("\n", drush_shell_exec_output())))); } return TRUE; } } /** * Automatically commit changes to the repository */ private function commit($project) { if (drush_get_option('bzrcommit')) { $message = drush_get_option('bzrmessage'); if (empty($message)) { $message = dt("Drush automatic commit: \n") . implode(' ', $_SERVER['argv']); } if (drush_shell_exec('bzr commit -m %s %s', $message, $project['full_project_path'])) { drush_log(dt('Project committed to Bazaar successfully'), 'ok'); } else { drush_set_error('DRUSH_PM_BZR_COMMIT_PROBLEMS', dt("Problems were encountered committing your changes to Bazaar.\nThe specific errors are below:\n!errors", array('!errors' => implode("\n", drush_shell_exec_output())))); } } else { drush_print(dt("You should consider committing the new code to your Bazaar repository.\nIf this version becomes undesireable, use Bazaar to roll back.")); } } }