'From Squeak3.7gamma of ''17 July 2004'' [latest update: #5985] on 24 August 2004 at 2:23:37 am'! "Change Set: CondenseSources-bg-dew Date: 24 August 2004 Author: Boris Gaertner and Doug Way Smalltalk condenseSources runs into an error that is caused by the fact, that the SourceFileVersionString is stored at two places - in SystemDictionary and in SmalltalkImage. This proposal removes SourceFileVersionString from SystemDictionary so that it's only stored in SmalltalkImage. Cleaned up for 3.7gamma. -dew"! IdentityDictionary subclass: #SystemDictionary instanceVariableNames: 'cachedClassNames ' classVariableNames: 'LastImageName LastQuitLogPosition LowSpaceProcess LowSpaceSemaphore MemoryHogs ShutDownList SourceFileVersionString SpecialSelectors StartUpList StartupStamp ' poolDictionaries: '' category: 'System-Support'! !SystemDictionary methodsFor: 'housekeeping' stamp: 'BG 12/5/2003 19:31'! condenseSources "Move all the changes onto a compacted sources file." "Smalltalk condenseSources" | f classCount dir newVersionString | Utilities fixUpProblemsWithAllCategory. "The above removes any concrete, spurious '-- all --' categories, which mess up the process." dir _ FileDirectory default. newVersionString _ FillInTheBlank request: 'Please designate the version for the new source code file...' initialAnswer: SmalltalkImage current sourceFileVersionString. newVersionString ifNil: [^ self]. newVersionString = SmalltalkImage current sourceFileVersionString ifTrue: [^ self error: 'The new source file must not be the same as the old.']. SmalltalkImage current sourceFileVersionString: newVersionString. "Write all sources with fileIndex 1" f _ FileStream newFileNamed: SmalltalkImage current sourcesName. f header; timeStamp. 'Condensing Sources File...' displayProgressAt: Sensor cursorPoint from: 0 to: Smalltalk classNames size during: [:bar | classCount _ 0. Smalltalk allClassesDo: [:class | bar value: (classCount _ classCount + 1). class fileOutOn: f moveSource: true toFile: 1]]. f trailer; close. "Make a new empty changes file" SmalltalkImage current closeSourceFiles. dir rename: SmalltalkImage current changesName toBe: SmalltalkImage current changesName , '.old'. (FileStream newFileNamed: SmalltalkImage current changesName) header; timeStamp; close. LastQuitLogPosition _ 0. self setMacFileInfoOn: SmalltalkImage current changesName. self setMacFileInfoOn: SmalltalkImage current sourcesName. SmalltalkImage current openSourceFiles. self inform: 'Source files have been rewritten!! Check that all is well, and then save/quit.'! ! !SystemDictionary methodsFor: 'image, changes name' stamp: 'dew 8/24/2004 02:13'! sourcesName "Answer the full path to the version-stable source code" self deprecated: 'Use SmalltalkImage current sourcesName'. ^ SmalltalkImage current sourcesName! ! IdentityDictionary subclass: #SystemDictionary instanceVariableNames: 'cachedClassNames' classVariableNames: 'LastImageName LastQuitLogPosition LowSpaceProcess LowSpaceSemaphore MemoryHogs ShutDownList SpecialSelectors StartUpList StartupStamp' poolDictionaries: '' category: 'System-Support'!