At http://bzr.arbash-meinel.com/branches/bzr/jam-integration

------------------------------------------------------------
revno: 3923
revision-id: [email protected]
parent: [email protected]
author: Adeodato Simo <[email protected]>
committer: John Arbash Meinel <[email protected]>
branch nick: jam-integration
timestamp: Tue 2009-01-06 09:02:42 -0600
message:
  Change the patience_diff.unified_diff code to not add trailing whitespace 
when no timestamp is supplied.
=== modified file 'bzrlib/patiencediff.py'
--- a/bzrlib/patiencediff.py    2007-09-04 09:10:35 +0000
+++ b/bzrlib/patiencediff.py    2009-01-06 15:02:42 +0000
@@ -76,11 +76,16 @@
         import difflib
         sequencematcher = difflib.SequenceMatcher
 
+    if fromfiledate:
+        fromfiledate = ' ' + str(fromfiledate)
+    if tofiledate:
+        tofiledate = ' ' + str(tofiledate)
+
     started = False
     for group in sequencematcher(None,a,b).get_grouped_opcodes(n):
         if not started:
-            yield '--- %s %s%s' % (fromfile, fromfiledate, lineterm)
-            yield '+++ %s %s%s' % (tofile, tofiledate, lineterm)
+            yield '--- %s%s%s' % (fromfile, fromfiledate, lineterm)
+            yield '+++ %s%s%s' % (tofile, tofiledate, lineterm)
             started = True
         i1, i2, j1, j2 = group[0][1], group[-1][2], group[0][3], group[-1][4]
         yield "@@ -%d,%d +%d,%d @@%s" % (i1+1, i2-i1, j1+1, j2-j1, lineterm)

-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to