Thrown whenever the parser chokes on a malformed unified diff.
Thrown by the hunk merge logic whenever the merge failed.
Collection of operations concerning an isolated file chunk.
Merge Hunk into lines.
Parameters: | lines (generator) – isolated collection of lines on which the hunk should be applied to. |
---|---|
Raises : | PatchConflictError |
Collection of Hunks concerning a single file.
Old file name
Comment relating old file name (i.e. last time of change)
New file name
Comment relating new file name (i.e. last time of change)
VCS related metadata (like diff parameters or commit id)
Merges entire hunk collection into lines.
Parameters: | lines (generator) – collection of lines on which the patch should be applied. |
---|---|
Raises : | PatchConflictError |
Collection of Patches.
Reads from in_stream and return the parsed patch set.
Parameters: | in_stream (file) – stream containing a patch set. |
---|
Stateful reader parsing arbitrary patches and hunks.
Parses set of by newline separated lines describing a patch set.
Parameters: | lines (generator) – collection of newline terminated lines |
---|---|
Raises : | PatchSyntaxError |