[squeak-dev] The Trunk: System-bf.504.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Dec 6 16:44:04 UTC 2012


Bert Freudenberg uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-bf.504.mcz

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

Name: System-bf.504
Author: bf
Time: 6 December 2012, 5:43:17.044 pm
UUID: 408c6c53-0dc1-47b4-8528-c51446d6f165
Ancestors: System-cmm.503

Revert methods warning about saving to Cog format.

=============== Diff against System-cmm.503 ===============

Item was removed:
- ----- Method: SmalltalkImage>>okayToSave (in category 'snapshot and quit') -----
- okayToSave
- 	| wasCog isCog |
- 	[wasCog := self imageFormatVersionFromFile allMask: 1]
- 		on: Error do: [:ignore | "probably save-as to non-existing file" ^ true ].
- 	isCog := Smalltalk isRunningCog.
- 	^(isCog not or: [wasCog]) or: [
- 		self confirm: 'Images saved under Cog cannot be opened on an interpreter again!!
- Really save?']
- !

Item was changed:
  ----- Method: SmalltalkImage>>saveAs: (in category 'sources, changes log') -----
  saveAs: newName
  	"Save the image  under that new name."
  	newName ifNil:[^ self].
- 	self okayToSave ifFalse: [^self].
  	(SourceFiles at: 2) ifNotNil:
  		[self closeSourceFiles; "so copying the changes file will always work"
  			 saveChangesInFileNamed: (self fullNameForChangesNamed: newName)].
  	self saveImageInFileNamed: (self fullNameForImageNamed: newName)!

Item was changed:
  ----- Method: SmalltalkImage>>saveAsNewVersion (in category 'sources, changes log') -----
  saveAsNewVersion
  	"Save the image/changes using the next available version number."
  	"SmalltalkImage current saveAsNewVersion"
  	
  	| newName changesName aName anIndex |
- 	self okayToSave ifFalse: [^self].
  	aName := FileDirectory baseNameFor: (FileDirectory default localNameFor: self imageName).
  	anIndex := aName lastIndexOf: FileDirectory dot asCharacter ifAbsent: [nil].
  	(anIndex notNil and: [(aName copyFrom: anIndex + 1 to: aName size) isAllDigits])
  		ifTrue:
  			[aName := aName copyFrom: 1 to: anIndex - 1].
  
  	newName := FileDirectory default nextNameFor: aName extension: FileDirectory imageSuffix.
  	changesName := self fullNameForChangesNamed: newName.
  
  	"Check to see if there is a .changes file that would cause a problem if we saved a new .image file with the new version number"
  	(FileDirectory default fileOrDirectoryExists: changesName)
  		ifTrue:
  			[^ self inform:
  'There is already .changes file of the desired name,
  ', newName, '
  curiously already present, even though there is
  no corresponding .image file.   Please remedy
  manually and then repeat your request.'].
  
  	(SourceFiles at: 2) ifNotNil:
  		[self closeSourceFiles; "so copying the changes file will always work"
  			saveChangesInFileNamed: (self fullNameForChangesNamed: newName)].
  	self saveImageInFileNamed: (self fullNameForImageNamed: newName)
  
  
  !

Item was changed:
  ----- Method: SmalltalkImage>>snapshot:andQuit: (in category 'snapshot and quit') -----
  snapshot: save andQuit: quit
- 	(save and: [self okayToSave not]) ifTrue: [^self].
  	^self snapshot: save andQuit: quit embedded: false!



More information about the Squeak-dev mailing list