python-unidiff icon indicating copy to clipboard operation
python-unidiff copied to clipboard

Unified diff python parsing/metadata extraction library

Results 29 python-unidiff issues
Sort by recently updated
recently updated
newest added

Perforce allows the generation of a patch from a changelist (~commit) using [`p4 describe`](https://www.perforce.com/perforce/doc.current/manuals/cmdref/Content/CmdRef/p4_describe.html) > `-du` : unified output format, showing added and deleted lines with num lines of context,...

The collections in this package `PatchSet` and `PatchedFile` do not annotate the type of their elements, so iterating over them creates a variable of type `Any`. For my code, this...

I am writing diff files using Python's `difflib.unified_diff()`; One such file commences with: ``` --- +++ @@ -2,6 +2,6 @@ ``` if I try to read it then unidiff fails...

I was wondering why unidiff fails on changes to files with filenames that include characters outside 7-bit ASCII, and it turns out that the latest release v0.7.5 does not include...

Added a type comment for the `newline` argument of `from_filename`, which is passed down to `open`.

Is there a way to limit the number of context lines before and after a modified / added / removed line?

[Dolt](https://www.dolthub.com/) is a versionable MySQL database that can commit, branch, push, and pull just like a git repository. The diff output is similar enough to git's that `PatchSet` is able...

Besides disabling them, git allows to set custom src/dst prefixes when rendering a diff (instead of `a/`, `b/`). unidiff should provide some way to parametrize this when parsing the diff.

I see the following regression starting with fd58ddcf849ed6885e3d096db3a7200e0b84705e: ``` /tmp/venv/bin/python -c 'import unidiff; unidiff.PatchSet.from_filename("test.patch.txt")' Traceback (most recent call last): File "", line 1, in File "/home/marxin/Programming/python-unidiff/unidiff/patch.py", line 591, in from_filename...