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
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
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11747
___
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':
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11747
___
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
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':
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
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
priority: normal - low
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11747
___
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
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.
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
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
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
14 matches
Mail list logo