'From Squeak3.8-Nihongo of 25 February 2005 [latest update: #7] on 1 March 2005 at 6:51:47 am'! "Change Set: SMInstallerVersionCheck Date: 1 March 2005 Author: Yoshiki Ohshima Better way to check the presense of #changes method at SystemDictionary."! !SMSimpleInstaller methodsFor: 'services' stamp: 'yo 3/1/2005 06:42'! fileIntoChangeSetNamed: aString fromStream: stream "We let the user confirm filing into an existing ChangeSet or specify another ChangeSet name if the name derived from the filename already exists." | changeSet newName oldChanges global | newName := aString. changeSet := SMInstaller changeSetNamed: newName. changeSet ifNotNil: [ newName := self silent ifNil: [FillInTheBlank request: 'ChangeSet already present, just confirm to overwrite or enter a new name:' initialAnswer: newName] ifNotNil: [newName]. newName isEmpty ifTrue:[self error: 'Cancelled by user']. changeSet := SMInstaller changeSetNamed: newName]. changeSet ifNil:[changeSet := SMInstaller basicNewChangeSet: newName]. changeSet ifNil:[self error: 'User did not specify a valid ChangeSet name']. oldChanges := (Smalltalk respondsTo: #changes) ifFalse: [global := ChangeSet. ChangeSet current] ifTrue: [global := Smalltalk. Smalltalk changes]. [global newChanges: changeSet. stream fileInAnnouncing: 'Loading ', newName, ' into change set ''', newName, ''''. stream close] ensure: [global newChanges: oldChanges]! !