load Monticello packages programatically

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

load Monticello packages programatically

Sebastia Van Lacke
Hi, I am using the gemtools to load monticello packages, but this is extremely slow. How can I do it programatically?? Better if the interface is Squeak compatible.
I tried doing MCMczReader loadVersionFile: '/path/to/foo.mcz' but didn't work. It fails in #readOnlyFileStreamNamed: on MCPlatformSupport class.
 
Thanks!
 
Sebastian
Reply | Threaded
Open this post in threaded view
|

Re: load Monticello packages programatically

Dale
Sebastian,

When I get 1.0-beta.8 ready, you'll be able to use Gofer for programmatic loads, until then something like the following should work:

  | repository version |
  repository := MCHttpRepository
    location: '<URL>'
    user: ''
    password: ''.
  repository
    versionReaderForFileNamed: '<mcz file name>'
    do: [:reader |
      version := reader version.
      version load.
      version workingCopy repositoryGroup addRepository: repository]

You should be able to use an MCDirectoryRepository too:

  repository := MCDirectoryRepository new
    directory: (FileDirectory on: '/home/dhenrich/monticello').

Dale
----- "Sebastian Van Lacke" <[hidden email]> wrote:

| Hi, I am using the gemtools to load monticello packages, but this is
| extremely slow. How can I do it programatically?? Better if the
| interface is Squeak compatible.
| I tried doing MCMczReader loadVersionFile: '/path/to/foo.mcz' but
| didn't work. It fails in #readOnlyFileStreamNamed: on
| MCPlatformSupport class.
|
| Thanks!
|
| Sebastian