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

commits at source.squeak.org commits at source.squeak.org
Sun Apr 18 17:11:40 UTC 2010


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:

=============== 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