[issue11747] unified_diff function product incorrect range information

2011-04-12 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 707078ca0a77 by Raymond Hettinger in branch '3.1': Issue 11747: Fix output format for context diffs. http://hg.python.org/cpython/rev/707078ca0a77 New changeset e3387295a24f by Raymond Hettinger in branch '3.2': Issue 11747: Fix

[issue11747] unified_diff function product incorrect range information

2011-04-12 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 09459397f807 by Raymond Hettinger in branch '2.7': Issue 11747: Fix output format for context diffs. http://hg.python.org/cpython/rev/09459397f807 -- ___ Python tracker

[issue11747] unified_diff function product incorrect range information

2011-04-12 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11747 ___

[issue11747] unified_diff function product incorrect range information

2011-04-11 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset a2ee967de44f by Raymond Hettinger in branch '3.2': Issue #11747: Fix range formatting in context and unified diffs. http://hg.python.org/cpython/rev/a2ee967de44f New changeset 1e5e3bb3e1f1 by Raymond Hettinger in branch 'default':

[issue11747] unified_diff function product incorrect range information

2011-04-11 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11747 ___

[issue11747] unified_diff function product incorrect range information

2011-04-11 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Re-opening. There are some problems with the fix. Context diff ranges need to show the ending line number, not the length. Also for unified diffs, GNU diff is showing (x,0) as just (x). -- priority: low - high

[issue11747] unified_diff function product incorrect range information

2011-04-10 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 36648097fcd4 by Raymond Hettinger in branch '3.2': Cleanup and modernize code prior to working on Issue 11747. http://hg.python.org/cpython/rev/36648097fcd4 New changeset 58a3bfcc70f7 by Raymond Hettinger in branch 'default':

[issue11747] unified_diff function product incorrect range information

2011-04-09 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: [Uncle Timmy] Would have to look at the history to see who added it, and ask them. That would be me :-) At the time, the goals were to: 1) make an easy-to-use, readable output format for file comparisons, 2) use the

[issue11747] unified_diff function product incorrect range information

2011-04-09 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11747 ___

[issue11747] unified_diff function product incorrect range information

2011-04-09 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Thanks, Raymond. That file says (in the -u section) If a range is empty, its beginning line number shall be the number of the line just before the range, or 0 if the empty range starts the file. The last clause says to me that gnu diff is

[issue11747] unified_diff function product incorrect range information

2011-04-08 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: @Tim: was it your intention that difflib track gnu diff? I am on the fence with this issue. Without input from Tim other than the doc, I am tempted to call this a feature request and retitle it Make unified_diff match gnu diff for [] input.

[issue11747] unified_diff function product incorrect range information

2011-04-08 Thread Tim Peters
Tim Peters tim.pet...@gmail.com added the comment: Terry, I had no intention here at all - had nothing to do with unified_diff. Would have to look at the history to see who added it, and ask them. That said, the very name unified_diff suggests someone did intend to mimic _some_ system's

[issue11747] unified_diff function product incorrect range information

2011-04-05 Thread ysj.ray
ysj.ray ysj@gmail.com added the comment: Since if one of the two comparing files is empty, gnu diff regards the beginning line of differences as line 0 (there is not any lines), but difflib regards it as line 1(there is a line, but empty). Not sure weather is correct since the practice

[issue11747] unified_diff function product incorrect range information

2011-04-02 Thread Jan Koprowski
New submission from Jan Koprowski jan.koprow...@gmail.com: Python: --- import difflib dl = difflib.unified_diff([], ['a\n', 'b\n']) print ''.join(dl), --- +++ @@ -1,0 +1,2 @@ +a +b Gnu diff: --- $diff -uN a b --- a 1970-01-01