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 created this task.May 5 2015, 2:56 PM
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 triaged this task as Low priority.May 7 2015, 1:45 PM
epriestley added a project: Support Impact.
epriestley moved this task from Backlog to arc patch on the Arcanist board.Dec 10 2015, 3:06 PM
ysood added a subscriber: ysood.Jul 29 2016, 11:17 PM

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

Itms added a subscriber: Itms.Dec 24 2016, 10:33 AM
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