Help scripting MC

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

Help scripting MC

stéphane ducasse-2
Hi

I would like to
        reset all the repository associated to packages
        and also set the repository to point to the right place


I tried the following for example to add a repository to the flash  
package
But it does not work (I closed the MC browser.....)

(MCWorkingCopy allManagers select: [:each | each package name =  
'Flash'])
                addRepository: (MCHttpRepository new location:  'http://
source.squeakfoundation.org/Balloon')

Does anybody know the right invocation. This way I could release 3.9  
with all the information nicely recorded

Stef

PS: the bug in changeset has been fixed....so once this is sorted out  
we can release 3.9

Reply | Threaded
Open this post in threaded view
|

Re: Help scripting MC

Philippe Marschall
2006/8/28, stéphane ducasse <[hidden email]>:
> Hi
>
> I would like to
>         reset all the repository associated to packages

The following should wipe all repositories:

MCWorkingCopy allManagers do: [ :each |
each repositoryGroup: (MCRepositoryGroup new) ]

MCRepositoryGroup default in: [ :default |
        default repositories copy do: [ :each |
                default  removeRepository: each ] ]

>         and also set the repository to point to the right place

How do you know the right place for a package?

> I tried the following for example to add a repository to the flash
> package
> But it does not work (I closed the MC browser.....)
>
> (MCWorkingCopy allManagers select: [:each | each package name =
> 'Flash'])
>                 addRepository: (MCHttpRepository new location:  'http://
> source.squeakfoundation.org/Balloon')
>
> Does anybody know the right invocation.

The following seems to get the job done for me:

(MCWorkingCopy allManagers select: [:each | each package name =
'Flash']) repositoryGroup addRepository: (MCHttpRepository location: 'http://
source.squeakfoundation.org/Balloon' user: '' password: '')

Philippe

Reply | Threaded
Open this post in threaded view
|

Re: Help scripting MC

stéphane ducasse-2
tx I found my way too.
I just could not remove some old package so I did it by hand.

Stef

On 29 août 06, at 20:03, Philippe Marschall wrote:

> 2006/8/28, stéphane ducasse <[hidden email]>:
>> Hi
>>
>> I would like to
>>         reset all the repository associated to packages
>
> The following should wipe all repositories:
>
> MCWorkingCopy allManagers do: [ :each |
> each repositoryGroup: (MCRepositoryGroup new) ]
>
> MCRepositoryGroup default in: [ :default |
> default repositories copy do: [ :each |
> default  removeRepository: each ] ]
>
>>         and also set the repository to point to the right place
>
> How do you know the right place for a package?
>
>> I tried the following for example to add a repository to the flash
>> package
>> But it does not work (I closed the MC browser.....)
>>
>> (MCWorkingCopy allManagers select: [:each | each package name =
>> 'Flash'])
>>                 addRepository: (MCHttpRepository new location:  
>> 'http://
>> source.squeakfoundation.org/Balloon')
>>
>> Does anybody know the right invocation.
>
> The following seems to get the job done for me:
>
> (MCWorkingCopy allManagers select: [:each | each package name =
> 'Flash']) repositoryGroup addRepository: (MCHttpRepository  
> location: 'http://
> source.squeakfoundation.org/Balloon' user: '' password: '')
>
> Philippe
>
>