python-patch
python-patch copied to clipboard
Library to parse and apply unified diffs
Given `file.txt`: ``` a b c ``` And this patch (`my.diff`): ``` --- file.txt +++ file.txt @@ -1,3 +1,4 @@ a b +b1 d ``` Which is applied using: ```.py...
I'm using `git diff xxx > patch`, when patch, failed with error: ``` invalid hunk header in patch ```
I have observed that patch.py adds an extra newline at the end of the patched file even though the unified patch doesn't alter the line at all. I know it...
Hi, I have created patches using let's say ```git format-patch -1``` To apply the patch using regular patch command line I apply: patch -p1 < patch When trying to use...
While running the unit tests on a modified branch of Python Patch, I've been trying to debug some of the failed tests I'm seeing. The first of these, `test_multiline_false_on_other_file()` would...
I have a unified patch file which can be successfully applied using the GNU utility *Patch*. The line numbers of the source files do not match the patch, however there...
``` At the moment, only file patching is implemented. Refactor to allow string patching. ``` Original issue reported on code.google.com by `[email protected]` on 25 Jul 2008 at 1:36
``` What do you want to do? Print the representation of a parsed patch, for instance to split a large patchset in one patch per patch file. How to test...
`next()` may be more generic way to run generator