Search code examples
version-controlsmalltalkpharomonticello

Manipulating repositories for specific Monticello packages programatically?


I want to automate some Monticello tasks. For this purpose i would have to first choose certain Monticello packages and then i would like to be able to:

  • add repositories,
  • remove repositories,
  • add user and password information for certain (Smalltalkhub) repositories.

I saw there is a small paragraph on "Programmatically adding repositories" in the upcoming Monticello chapter of "Deep into Pharo".

Can Gofer be used to automate tasks like this?


Solution

  • At least I found an answer to my third question:

    How to programatically add user and password information for certain (Smalltalkhub) repositories.

    (MCRepositoryGroup default repositories
        select: [:each | (each isKindOf: MCHttpRepository)
            and: [each locationWithTrailingSlash includesSubstring: 'http://smalltalkhub.com/mc/MyName/']])
        do: [:each | each user: 'MyName'; password: 'MyPassword'].
    

    The credit goes to "Pharo: Tips and Tricks" by Mariano Martinez Peck