Nicolas Cellier uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-nice.38.mcz==================== Summary ====================
Name: Network-nice.38
Author: nice
Time: 20 October 2009, 12:30:44 pm
UUID: d091db89-50b4-124f-91b0-4350c3016bd8
Ancestors: Network-tfel.37
use #fasterKeys
=============== Diff against Network-tfel.37 ===============
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 fasterKeys select: [:updateServer |
- outOfDateServers := updateLists keys 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 fasterKeys sort!
- ^self servers keys asSortedArray!