[Python-bugs-list] [ python-Feature Requests-635144 ] New UniDiffer class

SourceForge.net noreply@sourceforge.net
Mon, 12 May 2003 20:49:46 -0700


Feature Requests item #635144, was opened at 2002-11-07 14:49
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=635144&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martijn Pieters (mjpieters)
Assigned to: Raymond Hettinger (rhettinger)
Summary: New UniDiffer class

Initial Comment:
Attached is a new UniDiffer module, based on the
difflib.Differ class, which outputs GNU diff unified
context format compatible lines.

The class includes doctest tests and is intended to be
merged directly into the difflib module.

Jim Fulton saiz this can be added to the Python Library
under the current Python license.

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2003-05-12 22:49

Message:
Logged In: YES 
user_id=80475

Nope.  I have to blend this patch with another 
implementation and combine the best parts of each.  The 
SF is fine as it stands.

----------------------------------------------------------------------

Comment By: Brett Cannon (bcannon)
Date: 2003-05-12 21:58

Message:
Logged In: YES 
user_id=357491

Should this be made a patch instead of an RFE?

----------------------------------------------------------------------

Comment By: Martijn Pieters (mjpieters)
Date: 2002-11-08 14:14

Message:
Logged In: YES 
user_id=116747

'Nother version. One bug fix, one new feature.

- When two hunks were between 2 * context + 1 and 3* context
lines aparart, the starting context for the second hunk
would be partially lost.

- Handle missing newline on the last line like GNU diff
does. This currently only supports UNIX-style lineendings.
Documentation reflects this.

----------------------------------------------------------------------

Comment By: Martijn Pieters (mjpieters)
Date: 2002-11-08 11:18

Message:
Logged In: YES 
user_id=116747

And another little bug found: if set a is empty and set b is
not, resulting in all added lines,  an empty diff would be
returned. Attached latest version fixes this.

----------------------------------------------------------------------

Comment By: Martijn Pieters (mjpieters)
Date: 2002-11-07 16:34

Message:
Logged In: YES 
user_id=116747

Another update: when there were more than [context] lines in
between two updates, but less than 2 * [context], the two
chunks should not be split. This version fixes that problem;
we look ahead an extra [context] lines before cutting the chunk.

Also, timestamps in headers are now show the seconds
fraction as well, just like GNU diff.

----------------------------------------------------------------------

Comment By: Martijn Pieters (mjpieters)
Date: 2002-11-07 15:00

Message:
Logged In: YES 
user_id=116747

New version attached, fixing a context bug.

There was a small bug in the previous version where, if
context was set to 0, the all lines until the end of the
last chunk were shown.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=635144&group_id=5470