public function drush_version_control_svn::rollback

8.0.x svn.inc public drush_version_control_svn::rollback($project)
6.x svn.inc public drush_version_control_svn::rollback($project)
7.x svn.inc public drush_version_control_svn::rollback($project)
5.x svn.inc public drush_version_control_svn::rollback($project)
master svn.inc public drush_version_control_svn::rollback($project)

Implementation of rollback().

Overrides drush_version_control::rollback

File

commands/pm/version_control/svn.inc, line 47
Drush pm SVN extension

Class

drush_version_control_svn

Code

public function rollback($project) {
  if (drush_shell_exec('svn revert ' . drush_get_option('svnrevertparams') . ' ' . $project['full_project_path'])) {
    $output = drush_shell_exec_output();
    if (!empty($output)) {
      return drush_set_error('DRUSH_PM_SVN_LOCAL_CHANGES', dt("The SVN 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_SVN_NOT_FOUND', dt("Drush was unable to get the svn status on !path. Check that you have Subversion \ninstalled and that this directory is a subversion working copy.\nThe specific errors are below:\n!errors", array('!path' => $project['full_project_path'], '!errors' => implode("\n", drush_shell_exec_output()))));
  }
}