Skip to content

unidiff.errors.UnidiffParseError seen with v0.7.1 #89

@marxin

Description

@marxin

I see the following regression starting with fd58ddc:

/tmp/venv/bin/python -c 'import unidiff; unidiff.PatchSet.from_filename("test.patch.txt")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/marxin/Programming/python-unidiff/unidiff/patch.py", line 591, in from_filename
    instance = cls(f)
  File "/home/marxin/Programming/python-unidiff/unidiff/patch.py", line 454, in __init__
    self._parse(data, encoding=encoding, metadata_only=metadata_only)
  File "/home/marxin/Programming/python-unidiff/unidiff/patch.py", line 506, in _parse
    raise UnidiffParseError('Unexpected new file found: %s' % line)
unidiff.errors.UnidiffParseError: Unexpected new file found: new file mode 100644

test.patch.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions