The Trunk: Installer-Core-nice.92.mcz

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

The Trunk: Installer-Core-nice.92.mcz

commits-2
Nicolas Cellier uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-nice.92.mcz

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

Name: Installer-Core-nice.92
Author: nice
Time: 27 December 2009, 8:54:47 am
UUID: 8b0c6ca0-63ee-4725-825e-bc3a82a14784
Ancestors: Installer-Core-ul.91

Cosmetic: move or remove a few temps inside closures

=============== Diff against Installer-Core-ul.91 ===============

Item was changed:
  ----- Method: Installer>>newChangeSetFromStream:named: (in category 'mantis') -----
  newChangeSetFromStream: aStream named: aName
 
  "This code is based upon ChangeSet-c-#newChangesFromStream:named: which is in 3.9,
  implemented here for previous versions. The second branch is for 3.8, where ChangeSets
  are loaded by ChangeSorter. "
 
+ | oldChanges newName newSet |
- | oldChanges newName newSet newStream |
 
  (self classChangeSet respondsTo: #newChangesFromStream:named:)
  ifTrue: [ ^self classChangeSet newChangesFromStream: aStream named:aName ].
 
  (self classChangeSorter respondsTo: #newChangesFromStream:named:)
  ifTrue: [ ^self classChangeSorter newChangesFromStream: aStream named: aName ].
 
  oldChanges := ChangeSet current.
   
  "so a Bumper update can find it"
  newName := aName sansPeriodSuffix.
 
  newSet := self classChangeSet basicNewNamed: newName.
 
+ [ | newStream |
+ newSet
- [newSet
  ifNotNil: [(aStream respondsTo: #converter:)
  ifTrue: [newStream := aStream]
  ifFalse: [newStream := self classMultiByteBinaryOrTextStream with: aStream contentsOfEntireFile.
  newStream reset].
  self classChangeSet newChanges: newSet.
  newStream setConverterForCode.
  newStream fileInAnnouncing: 'Loading ' , newName , '...'.
  Transcript cr; show: 'File ' , aName , ' successfully filed in to change set ' , newName].
  aStream close]
  ensure: [self classChangeSet newChanges: oldChanges].
 
  ^ newSet!