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

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

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

Name: System-ar.338
Author: ar
Time: 16 June 2010, 7:52:24.553 pm
UUID: afc7591b-0a9a-bc4f-8b36-2081eb2445de
Ancestors: System-ar.337

Make it possible to run cleanup non-interactively.

=============== Diff against System-ar.337 ===============

Item was added:
+ ----- Method: SmalltalkImage>>cleanUp:except:confirming: (in category 'housekeeping') -----
+ cleanUp: aggressive except: exclusions confirming: aBool
+ "Clean up. When aggressive is true, this will destroy projects, change sets, etc.
+ Leave out any classes specifically listed in exclusions."
+
+ "Smalltalk cleanUp: true except: {Project. ChangeSet}"
+
+ | classes |
+ aBool ifTrue:[
+ "Give the user a chance to bail"
+ (self confirm: 'Cleanup will destroy projects, change sets and more.
+ Are you sure you want to proceed?') ifFalse:[^self].
+ ].
+
+ "Find all classes implementing #cleanUp or cleanUp:"
+ classes := Smalltalk allClasses select:[:aClass|
+ (aClass class includesSelector: #cleanUp)
+ or:[aClass class includesSelector: #cleanUp:]
+ ].
+
+ "Leave out the classes in the exclusion set"
+ classes := classes reject:[:aClass| exclusions includes: aClass].
+
+ "Arrange classes in superclass order, superclasses before subclasses.
+ This will ensure that specific cleanup (like MethodDictionary compaction)
+ will run after generic superclass cleanup (HashedCollection rehashing).
+ Otherwise generic superclass cleanup might undo specific one (in this
+ case rehashing will undo a good bit of MD compaction)."
+ classes := ChangeSet superclassOrder: classes.
+
+ "Run the cleanup code"
+ classes
+ do:[:aClass| aClass cleanUp: aggressive]
+ displayingProgress:[:aClass| 'Cleaning up in ', aClass name].!

Item was changed:
  ----- Method: SmalltalkImage>>cleanUp:except: (in category 'housekeeping') -----
  cleanUp: aggressive except: exclusions
  "Clean up. When aggressive is true, this will destroy projects, change sets, etc.
  Leave out any classes specifically listed in exclusions."
 
  "Smalltalk cleanUp: true except: {Project. ChangeSet}"
 
+ ^self cleanUp: aggressive except: exclusions confirming: aggressive!
- | classes |
- aggressive ifTrue:[
- "Give the user a chance to bail"
- (self confirm: 'Aggressive cleanup will destroy projects, change sets and more.
- Are you sure you want to proceed?') ifFalse:[^self].
- ].
-
- "Find all classes implementing #cleanUp or cleanUp:"
- classes := Smalltalk allClasses select:[:aClass|
- (aClass class includesSelector: #cleanUp)
- or:[aClass class includesSelector: #cleanUp:]
- ].
-
- "Leave out the classes in the exclusion set"
- classes := classes reject:[:aClass| exclusions includes: aClass].
-
- "Arrange classes in superclass order, superclasses before subclasses.
- This will ensure that specific cleanup (like MethodDictionary compaction)
- will run after generic superclass cleanup (HashedCollection rehashing).
- Otherwise generic superclass cleanup might undo specific one (in this
- case rehashing will undo a good bit of MD compaction)."
- classes := ChangeSet superclassOrder: classes.
-
- "Run the cleanup code"
- classes
- do:[:aClass| aClass cleanUp: aggressive]
- displayingProgress:[:aClass| 'Cleaning up in ', aClass name].!