When I try to do a drush_pm_update. I get the error that my svn working copy is out of sync. This happens because I have svn warnings:
svnserve: warning: cannot set LC_CTYPE locale
svnserve: warning: environment variable LANG is en_US.UTF-8
svnserve: warning: please check that your locale name is correct

These warnings do not obstruct the correct operation of svn. This could be solved by detecting if the svn output are warnings or pending updates. You can find the code that is causing this at line 24 in svn.inc,v 1.10.

// Check for incoming updates
    if (drush_shell_exec('svn status -u '. drush_get_option('svnstatusparams') .' '. $project['full_project_path'])) {
      $output = preg_grep('/^Status against revision:\s*[0-9]*$/', drush_shell_exec_output(), PREG_GREP_INVERT);
      if (!empty($output)) {
        return drush_set_error('DRUSH_PM_SVN_REMOTE_CHANGES', dt("The SVN working copy at !path appears to be out of date with the repository (see below). Please run 'svn update' to pull down changes before continuing:\n!output", array('!path' => $project['full_project_path'], '!output' => implode("\n", $output))));
      }
    }

Comments

victorcoder’s picture

subscribing

victorcoder’s picture

Version: All-Versions-2.1 » All-versions-3.0-beta1
victorcoder’s picture

In my case it's not the server warning but preg_grep('/^Status against revision:\s*[0-9]*$/', drush_shell_exec_output(), PREG_GREP_INVERT);

doesn't handle muntilanguage svn output other than english.

moshe weitzman’s picture

Title: drush update with svn warnings » handle muntilanguage svn output
Category: bug » feature

fix your svn so it doesn't warn.

retitle to reflect more legit feature request

jonhattan’s picture

Version: All-versions-3.0-beta1 »
Component: Code » PM (dl, en, up ...)
Priority: Normal » Critical

LANG=C somecommand fallbacks to posix english. It is a 'command not found' in plain windows. Works for cygwin afaik.

sh$ svn
Tipee «svn help»para ver el modo de uso.

sh$ LANG=C svn
Type 'svn help' for usage.

I can just commit LANG=C with no especial check for windows if you think it is better than current.

moshe weitzman’s picture

Priority: Critical » Minor

affects a tiny set of users. set to minor.

greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.