[squeak-dev] The Trunk: MonticelloConfigurations-dtl.98.mcz

Chris Muller asqueaker at gmail.com
Tue Aug 23 01:39:33 UTC 2011


My goal is to make it easy for Squeak users to store working configurations.

Berts comment finally clued me in about why MCConfigurations have
multiple repository's and then, on top of that, prompting the user for
yet another repository.  The ones that are part of the Config specify
where to access the packages.  The one prompted by the menu is asking
for where to store the .mcm itself.  This is to support configurations
that source from a variety of repositories.

Bert said he was ok with the smart-copy with a warning guard, how
about you?  Friends, I am sincerely curious why we would want to store
a broken configuration.  The Config specifies the packages that will
be copied, and "permission" is indicated by the user clicking the
"Store" button (the balloon help for it says, "Store the
Configuration").  It seems obvious and "safe" to me.  I don't even
think we need the warning, but I would certainly rather live with that
than continuing to copy packages individually..

 - Chris


On Sun, Aug 21, 2011 at 12:23 PM,  <commits at source.squeak.org> wrote:
> David T. Lewis uploaded a new version of MonticelloConfigurations to project The Trunk:
> http://source.squeak.org/trunk/MonticelloConfigurations-dtl.98.mcz
>
> ==================== Summary ====================
>
> Name: MonticelloConfigurations-dtl.98
> Author: dtl
> Time: 21 August 2011, 1:23:49.864 pm
> UUID: 0a3ef28c-0cbb-4dd2-9a08-3923a305d67e
> Ancestors: MonticelloConfigurations-cmm.97
>
> A configuration should not copy files into a target repository without knowledge or permission of the user. Revert prior changes until a safer implementation is proposed.
>
> =============== Diff against MonticelloConfigurations-cmm.97 ===============
>
> Item was changed:
>  ----- Method: MCConfigurationBrowser>>checkDependencies (in category 'dependencies') -----
>  checkDependencies
> +       ^self checkModified and: [self checkMissing]!
> -       | missing |
> -       missing := (self dependencies collect:
> -               [ : ea | ea versionInfo name ]) asSet.
> -       self repositories do:
> -               [ : eachRepository | eachRepository cacheAllFileNamesDuring:
> -                       [ missing copy do:
> -                               [ : eachVersionName | (eachRepository includesVersionNamed: eachVersionName) ifTrue: [ missing remove: eachVersionName ] ] ] ].
> -       ^ missing isEmpty or:
> -               [ self selectDependency: missing anyOne.
> -               self confirm:
> -                       (String streamContents:
> -                               [ : strm | strm
> -                                        nextPutAll: 'No repository found for' ;
> -                                        cr.
> -                               missing do:
> -                                       [ : r | strm
> -                                                nextPutAll: r ;
> -                                                cr ].
> -                               strm nextPutAll: 'Do you still want to store?' ]) ]!
>
> Item was added:
> + ----- Method: MCConfigurationBrowser>>checkMissing (in category 'dependencies') -----
> + checkMissing
> +       | missing |
> +       missing := (self dependencies collect:
> +               [ : ea | ea versionInfo name ]) asSet.
> +       self repositories do:
> +               [ : eachRepository | eachRepository cacheAllFileNamesDuring:
> +                       [ missing copy do:
> +                               [ : eachVersionName | (eachRepository includesVersionNamed: eachVersionName) ifTrue: [ missing remove: eachVersionName ] ] ] ].
> +       ^ missing isEmpty or:
> +               [ self selectDependency: missing anyOne.
> +               self confirm:
> +                       (String streamContents:
> +                               [ : strm | strm
> +                                        nextPutAll: 'No repository found for' ;
> +                                        cr.
> +                               missing do:
> +                                       [ : r | strm
> +                                                nextPutAll: r ;
> +                                                cr ].
> +                               strm nextPutAll: 'Do you still want to store?' ]) ]!
>
> Item was changed:
>  ----- Method: MCConfigurationBrowser>>store (in category 'actions') -----
>  store
> +       (self checkRepositories and: [self checkDependencies]) ifFalse: [^self].
> +       self pickName ifNotNil: [:name |
> +               self configuration name: name.
> +               self pickRepository ifNotNil: [:repo |
> +                       repo storeVersion: self configuration]].!
> -       (self checkRepositories and: [ self checkDependencies ]) ifFalse: [ ^ self ].
> -       self pickName ifNotNil:
> -               [ : name | self configuration name: name.
> -               self pickRepository ifNotNil:
> -                       [ : repo | repo cacheAllFileNamesDuring:
> -                               [ self configuration dependencies do:
> -                                       [ : each | repo
> -                                               versionWithInfo: each versionInfo
> -                                               ifAbsent: [ repo storeVersion: (MCRepositoryGroup default versionWithInfo: each versionInfo) ] ] ].
> -                       repo storeVersion: self configuration ] ]!
>
>
>


More information about the Squeak-dev mailing list