function _drush_cm_prepare_for_local_configuration_export

7.x _drush_cm_prepare_for_local_configuration_export(&$merge_info)
1 call to _drush_cm_prepare_for_local_configuration_export()


commands/core/, line 988
Provides Configuration Management commands.


function _drush_cm_prepare_for_local_configuration_export(&$merge_info) {
  $configuration_path = _drush_cm_get_configuration_path($merge_info);
  // Create a new temporary branch to hold the configuration changes
  // from the dev site ('@self').
  $result = drush_shell_cd_and_exec($configuration_path, 'git checkout -B %s %s', $merge_info['dev-config'], $merge_info['base']);
  if (!$result) {
    return drush_set_error('DRUSH_CONFIG_MERGE_FAILURE', dt("Could not create temporary branch !b", array('!b' => $merge_info['dev-config'])));
  // We set the upstream branch as a service for the user, to help with
  // cleanup should this process end before completion.
  drush_shell_cd_and_exec($configuration_path, 'git branch --set-upstream-to=%s', $merge_info['original-branch']);