moving a class betwen two monticello packages

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

moving a class betwen two monticello packages

michal-list


hello --

What is the best way of moving a class from one mcz package to another?

I typically load my packages with 'load' in the monticello browser. This means that when I move class C from pkg1 to pkg2, if I then load pkg1, C is removed from the system. Not what I want!

So is there a way of loading multiple packages at the same time which avoids that? Or some other solution?

thanks!

Reply | Threaded
Open this post in threaded view
|

Re: moving a class betwen two monticello packages

marcel.taeumel (old)
I pkg2 is loaded, too, C should still be present in the System.

1. Fresh Squeak install.
2. Load Pkg1.
3. Load Pkg2.
4. Move C from Pkg1 to Pkg2 by changing its System Category from, e.g., "Pkg1-Core" to "Pkg2-Core".
5. Saving Pkg1 in Monticello recognizes the deletion of class C. This is fine.
6. Saving Pkg2 in Monticello recognizes addition of class C. Also fine.

Having a system with old Pkg1 to update with new version, C will be removed. However, if you continue to load/update Pkg2, the class C should be there again. Maybe even stay, if you start loading Pkg2 and then *merging* Pkg1.

What exactly did you do? :)

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: moving a class betwen two monticello packages

michal-list

hi Marcel -

Thanks for your answer, and yes, I should have been clearer:

> What exactly did you do? :)

A version of this:

> Having a system with old Pkg1 to update with new version, C will be removed.

That is: mv class C from Pkg1 to Pkg2 in a development image, load Pkg1 and then Pkg2 in the server image (this is Seaside related).

And yes, depending on the order of loading, C will come back, but it will have lost its state, if any, obviously. So the question stands, I think:

What is the best way of moving a class from one mcz package to another, and then load those packages in a different image without ever getting C removed from the image?


cbc
Reply | Threaded
Open this post in threaded view
|

Re: moving a class betwen two monticello packages

cbc
If you load Pkg2 first, then the code will migrate over to that package (making Pkg1 dirty).  Then loading Pkg1 would 'clean' it up.  doing this, there should be no loss of the state during loading.
Yes, it does require loading them in a specific order.
And, yes, if you moved Class C from Pkg1 to Pkg2, and Class D from Pkg2 to Pkg1 in the same commits, you need to figure out how to do simultaeous loading.  Or, as I think is more common, don't do this all at once, but rather do them as two steps with specif loading ordering.

-cbc

On Wed, Jan 28, 2015 at 11:12 AM, Michal <[hidden email]> wrote:

hi Marcel -

Thanks for your answer, and yes, I should have been clearer:

> What exactly did you do? :)

A version of this:

> Having a system with old Pkg1 to update with new version, C will be removed.

That is: mv class C from Pkg1 to Pkg2 in a development image, load Pkg1 and then Pkg2 in the server image (this is Seaside related).

And yes, depending on the order of loading, C will come back, but it will have lost its state, if any, obviously. So the question stands, I think:

What is the best way of moving a class from one mcz package to another, and then load those packages in a different image without ever getting C removed from the image?





Reply | Threaded
Open this post in threaded view
|

Re: moving a class betwen two monticello packages

Levente Uzonyi-2
In reply to this post by michal-list
I guess the new version of Pkg2 depends on the new version of Pkg1. In
this case you can create a third package (Pkg3), and move class C to that
package. In your server image, load Pkg3 first (this will keep class C in
your image), then update Pkg1 and Pkg2, and finally unload Pkg3 (which
should be empty by now, because Pkg2 contains the class).

Levente

On Wed, 28 Jan 2015, Michal wrote:

>
> hi Marcel -
>
> Thanks for your answer, and yes, I should have been clearer:
>
>> What exactly did you do? :)
>
> A version of this:
>
>> Having a system with old Pkg1 to update with new version, C will be removed.
>
> That is: mv class C from Pkg1 to Pkg2 in a development image, load Pkg1 and then Pkg2 in the server image (this is Seaside related).
>
> And yes, depending on the order of loading, C will come back, but it will have lost its state, if any, obviously. So the question stands, I think:
>
> What is the best way of moving a class from one mcz package to another, and then load those packages in a different image without ever getting C removed from the image?
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: moving a class betwen two monticello packages

Eliot Miranda-2
In reply to this post by cbc


On Jan 28, 2015, at 11:21 AM, Chris Cunningham <[hidden email]> wrote:

If you load Pkg2 first, then the code will migrate over to that package (making Pkg1 dirty).  Then loading Pkg1 would 'clean' it up.  doing this, there should be no loss of the state during loading.
Yes, it does require loading them in a specific order.
And, yes, if you moved Class C from Pkg1 to Pkg2, and Class D from Pkg2 to Pkg1 in the same commits, you need to figure out how to do simultaeous loading.  Or, as I think is more common, don't do this all at once, but rather do them as two steps with specif loading ordering.


Right.  And the way to manage that order dependency is with a configuration.  You commit the version of pkg2 with the class moved into it from pkg1.  You create and commit a configuration for that state (new pkg2, old pkg1).  Then you commit the new pkg2 with the class missing.

The configuration ensures that the new pkg2 is loaded b4 the new pkg1, and hence that the class is not lost.

Search the list for info in Monticello configs.  There's a menu pick to open the MCConfigurationBrowser which will help.


-cbc

On Wed, Jan 28, 2015 at 11:12 AM, Michal <[hidden email]> wrote:

hi Marcel -

Thanks for your answer, and yes, I should have been clearer:

> What exactly did you do? :)

A version of this:

> Having a system with old Pkg1 to update with new version, C will be removed.

That is: mv class C from Pkg1 to Pkg2 in a development image, load Pkg1 and then Pkg2 in the server image (this is Seaside related).

And yes, depending on the order of loading, C will come back, but it will have lost its state, if any, obviously. So the question stands, I think:

What is the best way of moving a class from one mcz package to another, and then load those packages in a different image without ever getting C removed from the image?






Reply | Threaded
Open this post in threaded view
|

Re: moving a class betwen two monticello packages

Bert Freudenberg
On 28.01.2015, at 20:47, Eliot Miranda <[hidden email]> wrote:

On Jan 28, 2015, at 11:21 AM, Chris Cunningham <[hidden email]> wrote:

If you load Pkg2 first, then the code will migrate over to that package (making Pkg1 dirty).  Then loading Pkg1 would 'clean' it up.  doing this, there should be no loss of the state during loading.
Yes, it does require loading them in a specific order.
And, yes, if you moved Class C from Pkg1 to Pkg2, and Class D from Pkg2 to Pkg1 in the same commits, you need to figure out how to do simultaeous loading.  Or, as I think is more common, don't do this all at once, but rather do them as two steps with specif loading ordering.


Right.  And the way to manage that order dependency is with a configuration.  You commit the version of pkg2 with the class moved into it from pkg1.  You create and commit a configuration for that state (new pkg2, old pkg1).  Then you commit the new pkg2 with the class missing.

The configuration ensures that the new pkg2 is loaded b4 the new pkg1, and hence that the class is not lost.

Search the list for info in Monticello configs.  There's a menu pick to open the MCConfigurationBrowser which will help.

+1 on MCConfigs.

And didn’t we make them correctly handle moves between packages last year? I think you just need a single config with new versions of both Pkg1 and Pkg2.

- Bert -






smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: moving a class betwen two monticello packages

Eliot Miranda-2
Hi Bert,

On Jan 28, 2015, at 11:54 AM, Bert Freudenberg <[hidden email]> wrote:

On 28.01.2015, at 20:47, Eliot Miranda <[hidden email]> wrote:

On Jan 28, 2015, at 11:21 AM, Chris Cunningham <[hidden email]> wrote:

If you load Pkg2 first, then the code will migrate over to that package (making Pkg1 dirty).  Then loading Pkg1 would 'clean' it up.  doing this, there should be no loss of the state during loading.
Yes, it does require loading them in a specific order.
And, yes, if you moved Class C from Pkg1 to Pkg2, and Class D from Pkg2 to Pkg1 in the same commits, you need to figure out how to do simultaeous loading.  Or, as I think is more common, don't do this all at once, but rather do them as two steps with specif loading ordering.


Right.  And the way to manage that order dependency is with a configuration.  You commit the version of pkg2 with the class moved into it from pkg1.  You create and commit a configuration for that state (new pkg2, old pkg1).  Then you commit the new pkg2 with the class missing.

The configuration ensures that the new pkg2 is loaded b4 the new pkg1, and hence that the class is not lost.

Search the list for info in Monticello configs.  There's a menu pick to open the MCConfigurationBrowser which will help.

+1 on MCConfigs.

And didn’t we make them correctly handle moves between packages last year? I think you just need a single config with new versions of both Pkg1 and Pkg2.


D'u remember how that works?  I'm curious.

- Bert -

Eliot (phone)


Reply | Threaded
Open this post in threaded view
|

Re: moving a class betwen two monticello packages

Bert Freudenberg

On 28.01.2015, at 21:11, Eliot Miranda <[hidden email]> wrote:

Hi Bert,

On Jan 28, 2015, at 11:54 AM, Bert Freudenberg <[hidden email]> wrote:

On 28.01.2015, at 20:47, Eliot Miranda <[hidden email]> wrote:

On Jan 28, 2015, at 11:21 AM, Chris Cunningham <[hidden email]> wrote:

If you load Pkg2 first, then the code will migrate over to that package (making Pkg1 dirty).  Then loading Pkg1 would 'clean' it up.  doing this, there should be no loss of the state during loading.
Yes, it does require loading them in a specific order.
And, yes, if you moved Class C from Pkg1 to Pkg2, and Class D from Pkg2 to Pkg1 in the same commits, you need to figure out how to do simultaeous loading.  Or, as I think is more common, don't do this all at once, but rather do them as two steps with specif loading ordering.


Right.  And the way to manage that order dependency is with a configuration.  You commit the version of pkg2 with the class moved into it from pkg1.  You create and commit a configuration for that state (new pkg2, old pkg1).  Then you commit the new pkg2 with the class missing.

The configuration ensures that the new pkg2 is loaded b4 the new pkg1, and hence that the class is not lost.

Search the list for info in Monticello configs.  There's a menu pick to open the MCConfigurationBrowser which will help.

+1 on MCConfigs.

And didn’t we make them correctly handle moves between packages last year? I think you just need a single config with new versions of both Pkg1 and Pkg2.


D'u remember how that works?  I'm curious.

It’s supposed to gather all definitions that appear in more than one package (either as deletion or addition), and load them first.

- Bert -






smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: moving a class betwen two monticello packages

michal-list
In reply to this post by Eliot Miranda-2

>> Yes, it does require loading them in a specific order.

> Right.  And the way to manage that order dependency is with a configuration.  

Ok, that clear things up. Thanks to all of you, this whole thread was very helpful!