Status: FixProposed Owner: stephane...@gmail.com Labels: Milestone-1.3 New issue 3838 by stephane...@gmail.com: Cleaning MCPackageLoader http://code.google.com/p/pharo/issues/detail?id=3838 useChangeSetNamed: baseName during: aBlock "Use the named change set, or create one with the given name." | changeHolder oldChanges newChanges | changeHolder := (ChangeSet respondsTo: #newChanges:) ifTrue: [ChangeSet] ifFalse: [Smalltalk]. oldChanges := (ChangeSet respondsTo: #current) ifTrue: [ChangeSet current] ifFalse: [Smalltalk changes]. newChanges := (ChangeSet named: baseName) ifNil: [ ChangeSet new name: baseName ]. changeHolder newChanges: newChanges. [aBlock value] ensure: [changeHolder newChanges: oldChanges]. the respondsTo: are not needed since this is just to make sure that MC code would work in Squeak 3.6 or before. useChangeSetNamed: baseName during: aBlock "Use the named change set, or create one with the given name." | oldChanges newChanges | oldChanges :=ChangeSet current. newChanges := (ChangeSet named: baseName) ifNil: [ ChangeSet new name: baseName ]. ChangeSet newChanges: newChanges. [aBlock value] ensure: [ChangeSet newChanges: oldChanges].