[squeak-dev] The Trunk: Installer-Core-fbs.366.mcz
Frank Shearar
frank.shearar at gmail.com
Mon Apr 29 14:45:35 UTC 2013
On 29 April 2013 15:08, Chris Muller <asqueaker at gmail.com> wrote:
> Well, I think the proper change may be to make all implementors of
> #versionNamesForPackageNamed: consistently returning the same thing.
>
> It looks like I originally made this method answer an Array since 2011
> but, only when I recently added it to MCRepositoryGroup, made THAT ONE
> answer a Set. I failed to look at the others but instead "just
> thought about it". If the same version was in more than one
> repository we don't really need it multiple times.
>
> So what is the correct behavior? Perhaps answering a Set is the
> correct behavior afterall and the others should be changed too?
I see no problem with it being a Set. It's querying across multiple
repositories, and duplicate names are rather likely.
frank
> On Mon, Apr 29, 2013 at 6:13 AM, <commits at source.squeak.org> wrote:
>> Frank Shearar uploaded a new version of Installer-Core to project The Trunk:
>> http://source.squeak.org/trunk/Installer-Core-fbs.366.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Installer-Core-fbs.366
>> Author: fbs
>> Time: 29 April 2013, 12:13:46.368 pm
>> UUID: a93fa0fc-2a93-405a-86df-7aa334ee214b
>> Ancestors: Installer-Core-fbs.365
>>
>> versionNames is a Set nowadays, but we want to sort it. Hence, convert to an Array.
>>
>> =============== Diff against Installer-Core-fbs.365 ===============
>>
>> 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 asArray sort: self mcSortFileBlock.
>> - versionNames 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!
>>
>>
>
More information about the Squeak-dev
mailing list
|