◐ Shell
clean mode source ↗

Create delete files by mingwandroid · Pull Request #41 · techtonik/python-patch

@mingwandroid

mingwandroid added a commit to mingwandroid/conda-build that referenced this pull request

Jun 7, 2016

@mingwandroid

mingwandroid added a commit to mingwandroid/conda-build that referenced this pull request

Jun 7, 2016
`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#41

mingwandroid added a commit to mingwandroid/conda-build that referenced this pull request

Jun 7, 2016
`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#41

mingwandroid added a commit to mingwandroid/conda-build that referenced this pull request

Jun 7, 2016
`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).

`patch.py` is also excluded from flake8 for now.

Upstream: https://github.com/techtonik/python-patch
Pull Req: techtonik/python-patch#41

This was referenced

Sep 27, 2019