Root object migration

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

Root object migration

Brian Tabone-2
I originally set up my Magma repository to use the MagmaPreAllocatedDictionary and now I want to switch to the MagmaDictionary (I'm on Magma 1.3). I want to do this primarily so I can iterate easily over the keys. Is there a tried and true way to migrate your objects from one root to another? Should I set up another repository with a MagmaDictionary as root and iterate over known keys from the old repository and insert and commit them against the new repository?

Thanks in advance,
Brian Tabone

_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: Root object migration

Chris Muller-3
You could do it in the same repository.

To replace the root of a repository:

    mySession commit: [ mySession root: newRootObject ]

MagmaWarning will be produced when you do this.

Then the next time you compress that repository, the big file
associated with the old PreallocatedDictionary will not be part of the
compressed output, as long as it is no longer referenced.

HTH,
  Chris


On Tue, Feb 28, 2012 at 11:31 AM, Brian Tabone <[hidden email]> wrote:

> I originally set up my Magma repository to use the
> MagmaPreAllocatedDictionary and now I want to switch to the MagmaDictionary
> (I'm on Magma 1.3). I want to do this primarily so I can iterate easily over
> the keys. Is there a tried and true way to migrate your objects from one
> root to another? Should I set up another repository with a MagmaDictionary
> as root and iterate over known keys from the old repository and insert and
> commit them against the new repository?
>
> Thanks in advance,
> Brian Tabone
>
> _______________________________________________
> Magma mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>
_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma