The Trunk: Installer-Core-fbs.367.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Installer-Core-fbs.367.mcz

commits-2
Frank Shearar uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-fbs.367.mcz

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

Name: Installer-Core-fbs.367
Author: fbs
Time: 29 April 2013, 7:32:44.444 pm
UUID: e0b1622a-d940-4f2f-a56c-5ed43a07d4c8
Ancestors: Installer-Core-fbs.366

Use #sorted:.

=============== Diff against Installer-Core-fbs.366 ===============

Item was changed:
  ----- Method: InstallerMonticello>>mcThing (in category 'monticello') -----
  mcThing
  | loader |
  loader := self classMCVersionLoader new.
 
  "several attempts to read files - repository readableFileNames
  sometimes fails"
  self packages
  do: [:pkg |
  | versionNames fileToLoad version |
  versionNames := mc versionNamesForPackageNamed:
  (pkg asMCVersionName versionNumber = 0
  ifTrue: [ "Just a package name specified, use it whole." pkg ]
  ifFalse: [pkg asMCVersionName packageName]).
+ versionNames sorted: self mcSortFileBlock.
- versionNames asArray sort: self mcSortFileBlock.
  fileToLoad := versionNames
  detect: (self mcDetectFileBlock: pkg)
  ifNone: [ nil ].
  fileToLoad
  ifNotNil: [version := mc versionNamed: fileToLoad.
  (version isKindOf: MCConfiguration)
  ifTrue: [^ version]
  ifFalse: [self normalizedRepositories do: [:repo |
  MCRepositoryGroup default addRepository: repo].
  self normalizedRepositories do: [:repo |
  version workingCopy repositoryGroup addRepository: repo].
  loader addVersion: version].
  self logCR: ' found ' , version fileName , '...']].
  ^ loader!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Installer-Core-fbs.367.mcz

Bob Arning-2
My original question stands - what does this accomplish?

On 4/29/13 6:32 PM, [hidden email] wrote:
+ 			versionNames sorted: self mcSortFileBlock.
Cheers,
Bob


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Installer-Core-fbs.367.mcz

Frank Shearar-3
On 29 April 2013 19:49, Bob Arning <[hidden email]> wrote:
> My original question stands - what does this accomplish?
>
> On 4/29/13 6:32 PM, [hidden email] wrote:
>
> + versionNames sorted: self mcSortFileBlock.

Clearly I'm missing something fundamental in your question. It sorts a
Collection. That forces loading to be deterministic.

If you mean "but why you throw away the sorted Collection?", that
would be a much more meaningful question. The original "versionNames
sort:" is an in-place mutation; the correct conversion is
"(versionNames sorted: self mcSortFileBlock) detect: <do stuff>".

frank

> Cheers,
> Bob
>
>
>