The Trunk: Monticello-ar.338.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-ar.338.mcz

commits-2
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.338.mcz

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

Name: Monticello-ar.338
Author: ar
Time: 12 December 2009, 5:08:56 am
UUID: a65cfbe6-d9f5-6944-9d3b-61ccaa62def9
Ancestors: Monticello-ar.337, Monticello-ar.336

Try hard not to remove methods that have been moved to a different package.

=============== Diff against Monticello-ar.336 ===============

Item was changed:
  ----- Method: MCMethodDefinition>>unload (in category 'installing') -----
  unload
  | previousVersion |
  self isOverrideMethod ifTrue: [previousVersion := self scanForPreviousVersion].
  previousVersion
+ ifNil: [self actualClass ifNotNil:[:class| self removeSelector: selector fromClass: class]]
- ifNil: [self actualClass ifNotNil: [:class | class removeSelector: selector]]
  ifNotNil: [previousVersion fileIn] !

Item was added:
+ ----- Method: MCMethodDefinition>>removeSelector:fromClass: (in category 'installing') -----
+ removeSelector: aSelector fromClass: aClass
+ "Safely remove the given selector from the target class.
+ Be careful not to remove the selector when it has wondered
+ to another package."
+ | newCategory |
+ newCategory := aClass organization categoryOfElement: aSelector.
+ newCategory ifNotNil:[
+ "If moved to and fro extension, ignore removal"
+ (category beginsWith: '*') = (newCategory beginsWith: '*') ifFalse:[^self].
+ "Check if moved between different extension categories"
+ ((category beginsWith: '*') and:[category ~= newCategory]) ifTrue:[^self]].
+ aClass removeSelector: aSelector.
+ !