techtonik / python-patch

Library to parse and apply unified diffs
https://pypi.python.org/pypi/patch
106 stars 63 forks source link

line.strip('\r\n') contains '\r'. #62

Open rhinoceros opened 5 years ago

rhinoceros commented 5 years ago

line.strip('\r\n') contains '\r'.

fmarier commented 5 years ago

Can you describe the problem that your patch is fixing?

rhinoceros commented 5 years ago

Can you describe the problem that your patch is fixing?

when I parse svn diff , I meet the case: there were a lot of '\r' in line, and hunkactual["linestgt"] will always less than hunk.linestgt . hunk parse failed.

techtonik commented 3 years ago

@rhinoceros tests on Python 3 don't pass with this commit, so it is unlikely to be merged. Can you provide the diff file and describe how did it? If it came from public repo, that would be the best.