When using the svnsync option, drush executes svn commands in a shell. It send commands like

cd /path/to/my/workingdir/sites/all/modules/module && svn status

This doesn't work on Windows plattforms, because the paths are containing backslashes instead of slashes. Thus the command

cd D:/path/to/my/workingdir/sites/all/modules/module && svn status

is resulting in an error. But it can be easily changed:I have attached a patch that wraps all the critical shell commands and thus replaces the the slahes to backslashes prior to shell execution.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

Status: Active » Postponed (maintainer needs more info)

could you try with cygwin. i think you will have more luck. not sure we want to be chasing all shell commands and running them though this function. anyone have thoughts on this?

greg.1.anderson’s picture

This concept looks really familiar; maybe there's a dup issue somewhere?

ayalon’s picture

I used this patch and it made my drush working with svn on windows. Thanks!

ayalon’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community
greg.1.anderson’s picture

Status: Reviewed & tested by the community » Needs work

@ayalon: Thank you for testing this patch; however, I'm not entirely keen on the regex used here. It presumes that a Windows path will always start with a D:, and while it is true that such a path is a Windows path, I think this patch still leaves Windows relative paths unadressed, which could cause significant confusion to affected users.

Could you maybe try some of the other open issues related to escaping windows paths (e.g. #477720: Commands do not escape spaces in directory names and #766080: Windows support for drush: escaping the path to drush in backend invoke and elsewhere) and see if one of the techniques suggested there might work well enough to be universally applied?

greg.1.anderson’s picture

Status: Needs work » Closed (duplicate)