[issue8702] difflib: unified_diff produces wrong patches (again)

2010-05-13 Thread Mark Dickinson
Mark Dickinson added the comment: It turns out that this problem was already reported in issue 2142 (which has a patch); closing as a duplicate. -- resolution: -> duplicate status: open -> closed superseder: -> naive use of ''.join(difflib.unified_diff(...)) results in bogus diffs

[issue8702] difflib: unified_diff produces wrong patches (again)

2010-05-13 Thread Mark Dickinson
Mark Dickinson added the comment: I think difflib is behaving as intended here; changing to feature request. Could you please clarify about the information loss? I'm not seeing it. As far as I can tell, the fact that unified_diff produces a list rather than a single string (as GNU diff effe

[issue8702] difflib: unified_diff produces wrong patches (again)

2010-05-13 Thread R. David Murray
Changes by R. David Murray : -- keywords: +easy type: -> behavior versions: -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list m

[issue8702] difflib: unified_diff produces wrong patches (again)

2010-05-13 Thread anatoly techtonik
New submission from anatoly techtonik : If source/target file for unified format diff context doesn't end with new line, the diff should contain this marker: \ No newline at end of file Or else there is information loss when such patch is applied. http://en.wikipedia.org/wiki/Diff#Unified_for