[squeak-dev] The Trunk: Monticello-bf.388.mcz

Bert Freudenberg bert at freudenbergs.de
Sun Apr 18 21:30:16 UTC 2010


On 18.04.2010, at 22:44, Levente Uzonyi wrote:
> 
> 
> 
> On Sun, 18 Apr 2010, commits at source.squeak.org wrote:
> 
>> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
>> http://source.squeak.org/trunk/Monticello-bf.388.mcz
>> 
>> ==================== Summary ====================
>> 
>> Name: Monticello-bf.388
>> Author: bf
>> Time: 18 April 2010, 7:11:28.649 pm
>> UUID: 22c87ccc-e851-4d07-a3e8-a5413d3006b7
>> Ancestors: Monticello-bp.387
>> 
>> - bullet-proof #infoFromDictionary:cache: and re-use it in #extractInfoFrom:
> 
> There's a new bug here. MCInitializationTest >> #testWorkingCopy raises an error, because (aDictionary at: #id) returns an UUID instead of a String and UUID class >> #fromString: is not happy about it.
> Removing the #fromString: send results in 2 errors and a failure.
> 
> Probably an #isString check is enough, but it would be better to unify the senders.
> 
> 
> Levente


Interesting. Why is there a UUID in the dictionary? Ah, I see. Will commit a fix that ensures that the dictionary contains a String. Makes all MC tests green again :)

- Bert -

>> 
>> =============== Diff against Monticello-bp.387 ===============
>> 
>> Item was changed:
>> ----- Method: MCMczReader>>extractInfoFrom: (in category 'as yet unclassified') -----
>> extractInfoFrom: dict
>> + 	^MCWorkingCopy infoFromDictionary: dict cache: self infoCache!
>> - 	^ self infoCache at: (dict at: #id) ifAbsentPut:
>> - 		[MCVersionInfo
>> - 			name: (dict at: #name ifAbsent: [''])
>> - 			id: (UUID fromString: (dict at: #id))
>> - 			message: (dict at: #message ifAbsent: [''])
>> - 			date: ([Date fromString: (dict at: #date) ] on: Error do: [ :ex | ex return: nil ])
>> - 			time: ([ Time fromString:(dict at: #time)] on: Error do: [ :ex | ex return: nil ])
>> - 			author: (dict at: #author ifAbsent: [''])
>> - 			ancestors: ((dict at: #ancestors) collect: [:ea | self extractInfoFrom: ea])
>> - 			stepChildren: ((dict at: #stepChildren ifAbsent: [#()]) collect: [:ea | self extractInfoFrom: ea])]!
>> 
>> Item was changed:
>> ----- Method: MCWorkingCopy class>>infoFromDictionary:cache: (in category 'as yet unclassified') -----
>> infoFromDictionary: aDictionary cache: cache
>> 	| id |
>> 	id := aDictionary at: #id.
>> 	^ cache at: id ifAbsentPut:
>> 		[MCVersionInfo
>> + 			name: (aDictionary at: #name ifAbsent: [''])
>> + 			id: (UUID fromString: id)
>> + 			message: (aDictionary at: #message ifAbsent: [''])
>> + 			date: ([Date fromString: (aDictionary at: #date)] ifError: [nil])
>> + 			time: ([Time fromString: (aDictionary at: #time)] ifError: [nil])
>> + 			author: (aDictionary at: #author ifAbsent: [''])
>> + 			ancestors: (self ancestorsFromArray: (aDictionary at: #ancestors ifAbsent: []) cache: cache)
>> + 			stepChildren: (self ancestorsFromArray: (aDictionary at: #stepChildren ifAbsent: []) cache: cache)]!
>> - 			name: (aDictionary at: #name)
>> - 			id: (aDictionary at: #id)
>> - 			message: (aDictionary at: #message)
>> - 			date: (aDictionary at: #date)
>> - 			time: (aDictionary at: #time)
>> - 			author: (aDictionary at: #author)
>> - 			ancestors: (self ancestorsFromArray: (aDictionary at: #ancestors) cache: cache)]!
>> 
>> 
>> 
> 




More information about the Squeak-dev mailing list