Rev 3926: It turns out that internal_diff worked around the trailing whitespace problem in http://bzr.arbash-meinel.com/branches/bzr/jam-integration
John Arbash Meinel
john at arbash-meinel.com
Tue Jan 6 16:17:15 GMT 2009
At http://bzr.arbash-meinel.com/branches/bzr/jam-integration
------------------------------------------------------------
revno: 3926
revision-id: john at arbash-meinel.com-20090106161652-mmiu620z0uwuq659
parent: john at arbash-meinel.com-20090106151157-1eb23rpqw10hal27
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Tue 2009-01-06 10:16:52 -0600
message:
It turns out that internal_diff worked around the trailing whitespace problem
from unified_diff, so we have to remove that workaround.
Also, the filename should be separated from the date by a tab character, not by a blank
space.
-------------- next part --------------
=== modified file 'bzrlib/diff.py'
--- a/bzrlib/diff.py 2008-10-01 05:40:45 +0000
+++ b/bzrlib/diff.py 2009-01-06 16:16:52 +0000
@@ -99,9 +99,6 @@
ud[2] = ud[2].replace('-1,0', '-0,0')
elif not newlines:
ud[2] = ud[2].replace('+1,0', '+0,0')
- # work around for difflib emitting random spaces after the label
- ud[0] = ud[0][:-2] + '\n'
- ud[1] = ud[1][:-2] + '\n'
for line in ud:
to_file.write(line)
=== modified file 'bzrlib/patiencediff.py'
--- a/bzrlib/patiencediff.py 2009-01-06 15:02:42 +0000
+++ b/bzrlib/patiencediff.py 2009-01-06 16:16:52 +0000
@@ -77,9 +77,9 @@
sequencematcher = difflib.SequenceMatcher
if fromfiledate:
- fromfiledate = ' ' + str(fromfiledate)
+ fromfiledate = '\t' + str(fromfiledate)
if tofiledate:
- tofiledate = ' ' + str(tofiledate)
+ tofiledate = '\t' + str(tofiledate)
started = False
for group in sequencematcher(None,a,b).get_grouped_opcodes(n):
=== modified file 'bzrlib/tests/test_diff.py'
--- a/bzrlib/tests/test_diff.py 2009-01-06 15:11:57 +0000
+++ b/bzrlib/tests/test_diff.py 2009-01-06 16:16:52 +0000
@@ -1137,8 +1137,8 @@
'how are you today?\n']
unified_diff = bzrlib.patiencediff.unified_diff
psm = self._PatienceSequenceMatcher
- self.assertEquals(['--- a 2008-08-08\n',
- '+++ b 2008-09-09\n',
+ self.assertEquals(['--- a\t2008-08-08\n',
+ '+++ b\t2008-09-09\n',
'@@ -1,3 +1,2 @@\n',
' hello there\n',
'-world\n',
More information about the bazaar-commits
mailing list