'From Squeak3.2alpha of 2 October 2001 [latest update: #4471] on 5 November 2001 at 10:39:35 pm'! "Change Set: ChangesLogFix Date: 5 November 2001 Author: Dan Ingalls Fixes a long-time bug in changes logging that frequently caused source code for the most recent change to be smashed by the save-as operation. This logs a banner at the end of every fileIn which has the effect of flushing the changes file. Also includes a change which suppresses errors from attempting to execute banners (----) in the changes log. Also adds a convenience method, FileStream>>fileIntoNewChangeSet. "! !ChangeRecord methodsFor: 'initialization' stamp: 'di 11/5/2001 22:17'! fileIn | methodClass s | Cursor read showWhile: [(methodClass _ self methodClass) notNil ifTrue: [methodClass compile: self text classified: category withStamp: stamp notifying: nil]. (type == #doIt) ifTrue: [((s _ self string) beginsWith: '----') ifFalse: [Compiler evaluate: s]]. (type == #classComment) ifTrue: [(Smalltalk at: class asSymbol) comment: self text stamp: stamp]]! ! !PositionableStream methodsFor: 'fileIn/Out' stamp: 'di 11/5/2001 22:08'! fileInAnnouncing: announcement "This is special for reading expressions from text that has been formatted with exclamation delimitors. The expressions are read and passed to the Compiler. Answer the result of compilation. Put up a progress report with the given announcement as the title." | val chunk | announcement displayProgressAt: Sensor cursorPoint from: 0 to: self size during: [:bar | [self atEnd] whileFalse: [bar value: self position. self skipSeparators. [ val _ (self peekFor: $!!) ifTrue: [ (Compiler evaluate: self nextChunk logged: false) scanFrom: self ] ifFalse: [ chunk _ self nextChunk. self checkForPreamble: chunk. Compiler evaluate: chunk logged: true ]. ] on: InMidstOfFileinNotification do: [ :ex | ex resume: true]. self skipStyleChunk]. self close]. "Note: The main purpose of this banner is to flush the changes file." Smalltalk logChange: '----End fileIn of ' , self name , '----'. Smalltalk allBehaviorsDo: [ :cl | cl removeSelectorSimply: #DoIt; removeSelectorSimply: #DoItIn: ]. ^ val! ! !FileStream methodsFor: 'fileIn/Out' stamp: 'di 10/31/2001 12:07'! fileIntoNewChangeSet "File all of my contents into a new change set." self readOnly. ChangeSorter newChangesFromStream: self named: (self localName) ! !