Commit 2e4c995
committed
patch: Switch to using Python code
`patch.exe` from gnuwin32 has fallen over on several of my bigger
patches now and it's becoming a serious impediment.
I don't want to add MSYS2's `patch.exe` since that requires a lot
of infrastructure to work correctly (though I could build a native
Windows `patch.exe` if necessary).
However rather than relying on some arbitrary `patch` executable,
it's better to use Python to do the work and avoid the subprocess
overhead (though there will be a native-vs-python difference).
Also add automatic patch skip level detection logic, which allows
us to directly use patches generated using `git format-patch` and
also those authored by external entities without needing to add
metadata (although this may not be a bad idea). This part could be
moved into patch.py at a later point perhaps?
I've not added tests for this since upstream has a comprehensive
testsuite (and I did add tests to check my changes to my PR).
Upstream: https://github.com/techtonik/python-patch
Pull Req: techtonik/python-patch#411 parent 8fb4db9 commit 2e4c995
0 commit comments