[squeak-dev] The Trunk: Network-nice.39.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 20 22:57:26 UTC 2009


Nicolas Cellier uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-nice.39.mcz

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

Name: Network-nice.39
Author: nice
Time: 21 October 2009, 12:55:50 pm
UUID: 87b48e48-5984-4986-9c68-2c66d5b3a1c9
Ancestors: Network-nice.38

Use #keys rather than #fasterKeys
Note that pattern (x keys asArray sort) could as well be written (x keys sort) now that keys returns an Array...
This #asArray is here solely for cross-dialect/fork compatibility.

=============== Diff against Network-nice.38 ===============

Item was changed:
  ----- Method: ServerDirectory>>checkServersWithPrefix:andParseListInto: (in category 'updates') -----
  checkServersWithPrefix: prefix andParseListInto: listBlock
  	"Check that all servers are up and have the latest Updates.list.
  	Warn user when can't write to a server that can still be read.
  	The contents of updates.list is parsed into {{vers. {fileNames*}}*},
  	and returned via the listBlock."
  
  	|  serverList updateLists listContents maxSize outOfDateServers |
  	serverList := self serversInGroup.
  	serverList isEmpty
  		ifTrue: [^Array new].
  
  	updateLists := Dictionary new.
  	serverList do: [:updateServer |
  		[listContents := updateServer getFileNamed: prefix , 'updates.list'.
  		updateLists at: updateServer put: listContents]
  			on: Error
  			do: [:ex | 
  				UIManager default chooseFrom: #('Cancel entire update')
  					title: 'Server ', updateServer moniker,
  					' is unavailable.\Please consider phoning the administator.\' withCRs, listContents.
  				^Array new]].
  
  	maxSize := (updateLists collect: [:each | each size]) max.
+ 	outOfDateServers := updateLists keys select: [:updateServer |
- 	outOfDateServers := updateLists fasterKeys select: [:updateServer |
  		(updateLists at: updateServer) size < maxSize].
  
  	outOfDateServers do: [:updateServer |
  		(self outOfDate: updateServer) ifTrue: [^Array new]].
  
  	listBlock value: (Utilities parseListContents: listContents).
  
  	serverList removeAll: outOfDateServers.
  	^serverList
  
  !

Item was changed:
  ----- Method: ServerDirectory class>>serverNames (in category 'available servers') -----
  serverNames
+ 	^self servers keys asArray sort!
- 	^self servers fasterKeys sort!




More information about the Squeak-dev mailing list