public function drush_pm_version_control_bzr::rollback

4.x public drush_pm_version_control_bzr::rollback($project)

Implementation of rollback().

Overrides drush_pm_version_control::rollback


commands/pm/version_control/, line 39
Drush pm Bazaar extension




public function rollback($project) {
  if (drush_shell_exec('bzr revert %s', $project['full_project_path'])) {
    $output = drush_shell_exec_output();
    if (!empty($output)) {
      return drush_set_error('DRUSH_PM_BZR_LOCAL_CHANGES', dt("The Bazaar working copy at !path appears to have uncommitted changes (see below). Please commit or revert these changes before continuing:\n!output", array('!path' => $project['full_project_path'], '!output' => implode("\n", $output))));
  else {
    return drush_set_error('DRUSH_PM_BZR_NOT_FOUND', dt("Drush was unable to get the Bazaar status on !path. Check that you have Bazaar \ninstalled and that this directory is a Bazaar working copy.\nThe specific errors are below:\n!errors", array('!path' => $project['full_project_path'], '!errors' => implode("\n", drush_shell_exec_output()))));