New submission from Adeodato Simó <d...@net.com.org.es>:

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.

----------
components: Library (Lib)
files: python_difflib_fix.diff
keywords: patch
messages: 79473
nosy: dato, jameinel
severity: normal
status: open
title: {context,unified}_diff add spurious trailing whitespace if 
fromfiledate/tofiledate are emptyk
type: behavior
Added file: http://bugs.python.org/file12668/python_difflib_fix.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4898>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to