The Trunk: Monticello-bf.506.mcz

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

The Trunk: Monticello-bf.506.mcz

commits-2
Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-bf.506.mcz

==================== Summary ====================

Name: Monticello-bf.506
Author: bf
Time: 4 May 2012, 5:24:52.072 pm
UUID: 09260671-aa20-4eb7-bf88-687d20cb117d
Ancestors: Monticello-eem.505

Fix reverting an overloaded method. Uses new changes file scanning method from PackageInfo-Base-bf.61.

=============== Diff against Monticello-eem.505 ===============

Item was added:
+ ----- Method: MCMethodDefinition>>scanForPreviousVersions (in category 'installing') -----
+ scanForPreviousVersions
+ "Answer change records for other versions of this method, i.e. other overrides and the original version"
+ | versions |
+ versions := OrderedCollection new.
+ PackageInfo default changeRecordsForMethod: self asMethodReference do: [:record |
+ record category = category ifFalse: [versions add: record]].
+ ^versions
+ !

Item was changed:
  ----- Method: MCMethodDefinition>>unload (in category 'installing') -----
  unload
+ | previousVersions |
+ self isOverrideMethod ifTrue: [
+ previousVersions := self scanForPreviousVersions].
+ previousVersions isEmptyOrNil
+ ifTrue: [self actualClass ifNotNil: [:class |
+ self removeSelector: selector fromClass: class]]
+ ifFalse: [
+ "remove our override from history, even if buried below other overrides"
+ previousVersions reverseDo: [:version | version fileIn]] !
- | previousVersion |
- self isOverrideMethod ifTrue: [previousVersion := self scanForPreviousVersion].
- previousVersion
- ifNil: [self actualClass ifNotNil:[:class| self removeSelector: selector fromClass: class]]
- ifNotNil: [previousVersion fileIn] !