[squeak-dev] The Trunk: System-ul.230.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 11 00:20:57 UTC 2010


Levente Uzonyi uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ul.230.mcz

==================== Summary ====================

Name: System-ul.230
Author: ul
Time: 11 January 2010, 1:19:27.697 am
UUID: 1224d5f9-6222-774d-88d9-0c20fc144472
Ancestors: System-ar.229

- remove cr's from the patch sequence built by TextDiffBuilder >> #buildPatchSequence for backwards compatibility
- do not print extra cr's if the line ends with crlf in TextDiffBuilder >> #print:withAttributes:on: 

=============== Diff against System-ar.229 ===============

Item was changed:
  ----- Method: TextDiffBuilder>>buildPatchSequence (in category 'creating patches') -----
  buildPatchSequence
  	"This method is only implemented for backwards compatibility and testing."
  
  	^Array streamContents: [ :stream |
  		self 
+ 			patchSequenceDoIfMatch: [ :string |
+ 				stream nextPut: #match -> (string copyWithout: Character cr) ]
+ 			ifInsert: [ :string | 
+ 				stream nextPut: #insert -> (string copyWithout: Character cr) ]
+ 			ifRemove: [ :string | 
+ 				stream nextPut: #remove -> (string copyWithout: Character cr) ] ]!
- 			patchSequenceDoIfMatch: [ :string | stream nextPut: #match -> string ]
- 			ifInsert: [ :string | stream nextPut: #insert -> string ]
- 			ifRemove: [ :string | stream nextPut: #remove -> string ] ]!

Item was changed:
  ----- Method: TextDiffBuilder>>print:withAttributes:on: (in category 'private') -----
  print: aString withAttributes: attributes on: stream
  
  	stream
  		withAttributes: attributes 
  		do: [ 
  			stream nextPutAll: aString.
+ 			(aString notEmpty and: [ 
+ 				aString last = Character cr or: [
+ 					aString endsWith: String crlf ] ]) 
+ 						ifFalse: [ stream cr ] ]!
- 			(aString isEmpty or: [ aString last ~= Character cr ]) ifTrue: [ stream cr ] ]!




More information about the Squeak-dev mailing list