Remove class history

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

Remove class history

Thelliez
Ok, I could test it myself... but does the 'Remove class history' actually migrate all instances?

Even-though I left the automigrate to on,  some classes have an history. I am not sure in what condition this happens.


Thanks,
Thierry
Reply | Threaded
Open this post in threaded view
|

Re: Remove class history

Dale Henrichs
On 04/27/2011 04:03 PM, Thierry Thelliez wrote:
> Ok, I could test it myself... but does the 'Remove class history'
> actually migrate all instances?
>
> Even-though I left the automigrate to on,  some classes have an history.
> I am not sure in what condition this happens.
>
>
> Thanks,
> Thierry

Thierry,

I don't think so ... I have a class that will be available with
1.0-beta.8.7 that does migrate the instances for all of the classes in
the class history ...

I'd have to check but you can probably use the GsDeployer class with
1.0-beta.8.6.

Dale
Reply | Threaded
Open this post in threaded view
|

Re: Remove class history

Thelliez


 >> I'd have to check but you can probably use the GsDeployer class with 1.0-beta.8.6.

I am still on Pharo 1.0, GemTools 8.4.  Should I upgrade?


Also, the following should work:

[ :className | | c |
    c := Smalltalk at: className.   
    c isBehavior  
    ifTrue: [ 
        [ c classHistory size > 1 ]  
          whileTrue: [ ( c classHistory at: 1 ) migrateInstancesTo: c classHistory currentVersion.  
                            c classHistory removeVersion: ( c classHistory at: 1 ) ]  
     ]

] value: #MyTestClassWithHistory


Thierry
Reply | Threaded
Open this post in threaded view
|

Re: Remove class history

Dale Henrichs
It shouldn't hurt to move to 1.0-beta.8.6 ... if it does hurt, let me know:)

That's basically what GsDeployer does...so that would work too.

Dale

On Apr 28, 2011, at 1:51 PM, Thierry Thelliez wrote:

>
>
>  >> I'd have to check but you can probably use the GsDeployer class with 1.0-beta.8.6.
>
> I am still on Pharo 1.0, GemTools 8.4.  Should I upgrade?
>
>
> Also, the following should work:
>
> [ :className | | c |
>     c := Smalltalk at: className.  
>     c isBehavior  
>     ifTrue: [
>         [ c classHistory size > 1 ]  
>           whileTrue: [ ( c classHistory at: 1 ) migrateInstancesTo: c classHistory currentVersion.  
>                             c classHistory removeVersion: ( c classHistory at: 1 ) ]  
>      ]
>
> ] value: #MyTestClassWithHistory
>
>
> Thierry