Page MenuHomePhabricator

arc patch fails on Windows with SVN (because it uses "cd", not "setCWD")
Open, LowPublic

Description

When running arc patch command on Windows command line with SVN repository, the command fails with following message:

C:\working_copy\arc patch Dxx
The system cannot find the path specified.


 WARNING  Some hunks could not be applied cleanly by the unix 'patch' utility. Your working copy may be different from the revision's base, or you may be in the wrong subdirectory. You can export the raw patch file using 'arc export --unified', and then try to apply it by fiddling with options to 'patch' (particularly, -p), or manually. The output above, from 'patch', may be helpful in figuring out what went wrong.

The command fails because of ; characters in command chaining (e.g. (cd %s; patch -p0 < %s)) as was predicted in this todo comment in ArcanistPatchWorkflow.php.

I made a quick fix in my github fork so that may shed some more light on the issue if needed. Basically it uses setCWD() method on future/passthru instead of directly calling cd.

Event Timeline

oujesky raised the priority of this task from to Needs Triage.
oujesky updated the task description. (Show Details)
oujesky added projects: Arcanist, Windows.
oujesky updated the task description. (Show Details)
oujesky added a subscriber: oujesky.
epriestley added a project: Support Impact.

@oujesky thanks for the git link. I was able to get the arc patch command working in the meanwhile with these changes.

epriestley renamed this task from arc patch fails on Windows with SVN to arc patch fails on Windows with SVN (because it uses "cd", not "setCWD").Oct 2 2018, 1:03 PM