private function drush_version_control_svn::commit

8.0.x svn.inc private drush_version_control_svn::commit($project)
6.x svn.inc private drush_version_control_svn::commit($project)
7.x svn.inc private drush_version_control_svn::commit($project)
5.x svn.inc private drush_version_control_svn::commit($project)
master svn.inc private drush_version_control_svn::commit($project)

Automatically commit changes to the repository

2 calls to drush_version_control_svn::commit()
drush_version_control_svn::post_download in commands/pm/version_control/svn.inc
Implementation of post_download().
drush_version_control_svn::post_update in commands/pm/version_control/svn.inc
Implementation of post_update().

File

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

Class

drush_version_control_svn

Code

private function commit($project) {
  if (drush_get_option('svncommit')) {
    $message = drush_get_option('svnmessage');
    if (empty($message)) {
      $message = dt("Drush automatic commit: \n") . implode(' ', $_SERVER['argv']);
    }
    if (drush_shell_exec('svn commit ' . drush_get_option('svncommitparams') . ' -m "' . $message . '" ' . $project['full_project_path'])) {
      drush_log(dt('Project committed to Subversion successfully'), LogLevel::OK);
    }
    else {
      drush_set_error('DRUSH_PM_SVN_COMMIT_PROBLEMS', dt("Problems were encountered committing your changes to Subversion.\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 Subversion repository.\nIf this version becomes undesireable, use Subversion to roll back."));
  }
}