Issue 4898: {context,unified}_diff add spurious trailing whitespace if fromfiledate/tofiledate are emptyk (original) (raw)

Created on 2009-01-09 15:38 by dato, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python_difflib_fix.diff dato,2009-01-09 15:38 Patch to fix this issue
Messages (5)
msg79473 - (view) Author: Adeodato Simó (dato) Date: 2009-01-09 15:38
Hello. I recently noticed that Bazaar's unified_diff() was emiting ---/+++ lines with a trailing whitespace if fromfiledate/tofiledate were the empty string. (Which was bad because a program to detect spurious trailing whitespace in diffs would flag them as errors.) A patch [1] was committed recently in their tree. During the discussion, it was pointed out that the affected function was a copy of Python's own unified_diff() in difflib, which suffered the same problem. [1]: http://bazaar.launchpad.net/~bzr/bzr/trunk/revision/3923 I'm now attaching a patch to fix this issue in Python. It'd be great if you'd consider applying it. (It seems that the correct character to separate dates is a tab and not a space; if you feel changing this is breaking backwards compatibility, feel free to s/\t/ / in my patch.) Thanks.
msg79493 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2009-01-09 19:48
Who is the author of this patch?
msg79494 - (view) Author: Adeodato Simó (dato) Date: 2009-01-09 19:51
> Who is the author of this patch? I am the author of the patch attached to this bug report.
msg105640 - (view) Author: anatoly techtonik (techtonik) Date: 2010-05-13 16:20
Another 'easy' patch hangs for ages. =/ tag:easy tag:difflib
msg105643 - (view) Author: anatoly techtonik (techtonik) Date: 2010-05-13 16:27
Thanks for the patch. This was fixed as part of issue 7585. Please add issue 7585 as superceder and close this.
History
Date User Action Args
2022-04-11 14:56:43 admin set github: 49148
2010-05-14 04:59:29 r.david.murray set status: open -> closedresolution: fixedsuperseder: difflib should separate filename from timestamp with tabstage: resolved
2010-05-13 16:27:09 techtonik set messages: +
2010-05-13 16:20:18 techtonik set nosy: + techtonikmessages: +
2009-01-09 19:51:50 dato set messages: +
2009-01-09 19:48:04 loewis set nosy: + loewismessages: +
2009-01-09 15:38:11 dato create