[Glass] Cleaning up TimeZone class history

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Sun Jul 17 06:17:01 PDT 2016


On an unrelated note ... Paul, do you realize that according to my mail 
browser this reply arrived 20 minutes before the original email? Makes 
it a bit interesting trying to read multiple emails on the same subject 
since they are not really in "chronological order"... the other day each 
message had a seemly random timestamp and the conversation was very 
difficult to follow :)

What did the stack look like for the error?

... oh you are in a loop ... you need to explicitly abort before each 
#migrateInstancesTo: call --- if there are modified objects in the 
system. So a commit is probably needed after each #removeVersion: call 
... just a guess.

Is there a reason why you are trying to clean up the class history for 
Timezone?

Dale

On 7/16/16 4:24 PM, Paul DeBruicker via Glass wrote:
> Oh and if logged in as SystemUser in linked topaz I run
>
> topaz 1> abort
> topaz 1> printit
>    [ TimeZone classHistory size > 1 ]
>      whileTrue: [
>        (TimeZone classHistory at: 1)
>          migrateInstancesTo: TimeZone classHistory currentVersion.
>        TimeZone classHistory removeVersion: (TimeZone classHistory at: 1) ].
> %
>
> I get this error:
>
>
> ERROR 2412 , a TransactionError occurred (error 2412),
> reason:rtErrAbortWouldLoseData, A method that requires an abort is being
> executed, however, an abort would result in lost data. (TransactionError)
>
>
> So progress, but not completely there.
>
>
>
>
>
> GLASS mailing list wrote
>> Hi -
>>
>> In my stone I have ObsoleteTimeZone & ObsoleteTimeZone2 in the TimeZone
>> class history of a stone I just updated to 3.3.1.   The DataCurator user
>> doesn't have permissions to migrate those classes apparently.  And when I
>> sign in as the SystemUser in linked Topaz the Smalltalk symbol is not
>> understood.
>>
>> To do the migration I'm running:
>>
>>    System abort.
>>    System beginTransaction.
>>    [ :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: #'TimeZone'.
>>    System commitTransaction
>>
>>
>>
>> Thanks
>>
>>
>> Paul
>> _______________________________________________
>> Glass mailing list
>> Glass at .gemtalksystems
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>
>
> --
> View this message in context: http://forum.world.st/Cleaning-up-TimeZone-class-history-tp4906795p4906796.html
> Sent from the GLASS mailing list archive at Nabble.com.
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list