private function drush_pm_version_control_bzr::commit

3.x private drush_pm_version_control_bzr::commit($project)
4.x private drush_pm_version_control_bzr::commit($project)

Automatically commit changes to the repository


commands/pm/version_control/, line 108
Drush pm BZR extension




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."));