[V3dot9] Fwd: [Fix] Assure ChangeSet Current is valid

stéphane ducasse ducasse at iam.unibe.ch
Tue Sep 19 10:17:04 UTC 2006



Begin forwarded message:

> From: Peace Jerome <peace_the_dreamer at yahoo.com>
> Date: 19 septembre 2006 09:55:04 HAEC
> To: "stéphane" ducasse <ducasse at iam.unibe.ch>
> Subject: [Fix] Assure ChangeSet Current is valid
>
> Hi Stef,
>
> Found the problem and hopefully a solid fix.
> I've updated the mantis report. And the fix is there.
> To save you time I've attached the fix to this email
> as well.
>
> There of course is the question of what clobbered the
> current changeset in the first place and where is it
> lurking. However for now I'll settle for guarding the
> current changeset. That is probably a good thing to do
> in any event.
>
> From the mantis report.
>
>
> Well sure enough the install method
> !ChangeSet class>>newChangesFromStream: aStream named:
> aName
>
> was carefully perserving the current changeset around
> the install.
> The postscript could not fix anything.
> Whatever it did to the current change set was undone.
>
> The Ironman fix is to make sure Changeset current
> always returns a valid changeset.
>
> so I modified the accessor:
>
> 'From Squeak3.9gamma of ''23 July 2006'' [latest
> update: #7058] on 19 September 2006 at 3:22:08 am'!
>
> !ChangeSet class methodsFor: 'current changeset'
> stamp: 'wiz 9/19/2006 03:21'!
> current
> 	"return the current changeset
> 	assure first that we have a named changeset. To cure
> mantis #4535. "
>
> 	current isMoribund 	ifTrue:
>  [(ChangeSet newChanges:
> (ChangeSet   assuredChangeSetNamed: 'Unnamed'))] .
>
> 	^ current! !
>
> This works because #newChanges: accesses current
> directly (If it ever chooses to use the indirect
> accessor this will be an infinite loop. Fortunately it
> is sane and this fix will work.)
>
> Once this patch is made any new changesorter will show
> a reasonable changeset and changes won't be lost.
>
>
> Again thanks for your service, responsibility, and
> perseverence.
>
>
> Yours in service, -- Jerome Peace
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com 'From Squeak3.9gamma of ''23 July  
> 2006'' [latest update: #7058] on 19 September 2006 at 3:22:08 am'!
>
> !ChangeSet class methodsFor: 'current changeset' stamp: 'wiz  
> 9/19/2006 03:21'!
> current
> 	"return the current changeset
> 	assure first that we have a named changeset. To cure mantis #4535. "
> 	current isMoribund
> 		ifTrue: [(ChangeSet newChanges: (ChangeSet assuredChangeSetNamed:  
> 'Unnamed'))] .
>
> 	^ current! !



More information about the V3dot9 mailing list