'From Squeak3.1alpha of 6 February 2001 [latest update: #4173] on 18 August 2001 at 11:31:45 am'! "Change Set: SqueakListChangeFix-nk Date: 8 August 2001 Author: Ned Konz This changes the hard-coded name of the Squeak list in the mail out bug report or change set operations to squeak-dev@lists.squeakfoundation.org "! !ChangeSet methodsFor: 'fileIn/Out' stamp: 'nk 8/8/2001 12:55'! mailOut "File out the receiver, to a file whose name is a function of the change-set name and either of the date & time or chosen to have a unique numeric tag, depending on the preference 'sequentialChangeSetRevertableFileNames'." | subjectPrefix slips message compressBuffer compressStream data compressedStream compressTarget | (Smalltalk includesKey: #Celeste) ifFalse: [^ self inform: 'no mail reader present']. subjectPrefix _ self chooseSubjectPrefixForEmail. self checkForConversionMethods. Cursor write showWhile: [ "prepare the message" message := MailMessage empty. message setField: 'from' toString: Celeste userName. message setField: 'to' toString: 'squeak-dev@lists.squeakfoundation.org'. message setField: 'subject' toString: (subjectPrefix, name). message body: (MIMEDocument contentType: 'text/plain' content: (String streamContents: [ :str | str nextPutAll: 'from preamble:'; cr; cr. self fileOutPreambleOn: str ])). "Prepare the gzipped data" data _ data _ WriteStream on: String new. data header. self fileOutPreambleOn: data. self fileOutOn: data. self fileOutPostscriptOn: data. data trailer. data _ ReadStream on: data contents. compressBuffer _ ByteArray new: 1000. compressStream _ GZipWriteStream on: (compressTarget _ WriteStream on: (ByteArray new: 1000)). [data atEnd] whileFalse: [compressStream nextPutAll: (data nextInto: compressBuffer)]. compressStream close. compressedStream _ ReadStream on: compressTarget contents asString. message addAttachmentFrom: compressedStream withName: (name, '.cs.gz'). CelesteComposition openForCeleste: Celeste current initialText: message text. ]. Preferences suppressCheckForSlips ifTrue: [^ self]. slips _ self checkForSlips. (slips size > 0 and: [self confirm: 'Methods in this fileOut have halts or references to the Transcript or other ''slips'' in them. Would you like to browse them?']) ifTrue: [Smalltalk browseMessageList: slips name: 'Possible slips in ' , name]! ! !Debugger methodsFor: 'context stack menu' stamp: 'nk 8/8/2001 12:55'! mailOutBugReport "Compose a useful bug report showing the state of the process as well as vital image statistics as suggested by Chris Norton - 'Squeak could pre-fill the bug form with lots of vital, but oft-repeated, information like what is the image version, last update number, VM version, platform, available RAM, author...' and address it to the list with the appropriate subject prefix." | subjectPrefix messageStrm | (Smalltalk includesKey: #Celeste) ifFalse: [^ self inform: 'no mail reader present']. subjectPrefix _ '[BUG]'. Cursor write showWhile: ["Prepare the message" messageStrm _ WriteStream on: (String new: 30). messageStrm nextPutAll: 'From: '; nextPutAll: Celeste userName; cr; nextPutAll: 'To: squeak-dev@lists.squeakfoundation.org'; cr; nextPutAll: 'Subject: '; nextPutAll: subjectPrefix; nextPutAll: self interruptedContext printString; cr;cr; nextPutAll: 'here insert explanation of what you were doing, suspect changes youd made and so forth.';cr;cr; nextPutAll: 'Image version: '; nextPutAll: Smalltalk systemInformationString ; cr;cr; nextPutAll: 'VM version: '; nextPutAll: Smalltalk vmVersion asString, String cr, 'for: ', Smalltalk platformName asString; cr;cr; nextPutAll: 'Receiver: '; nextPutAll: receiverInspector object printString; cr;cr; nextPutAll: 'Instance variables: ';cr; nextPutAll: receiverInspector object longPrintString; cr; nextPutAll: 'Method (temp) variables: ';cr; nextPutAll: contextVariablesInspector object tempsAndValues; cr; nextPutAll: 'Stack: '; cr. self contextStackList do: [:e | messageStrm nextPutAll: e; cr]. CelesteComposition openForCeleste: Celeste current initialText: messageStrm contents]. ! !