[squeak-dev] The Trunk: Monticello-eem.785.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jan 12 19:07:07 UTC 2023


Eliot Miranda uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-eem.785.mcz

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

Name: Monticello-eem.785
Author: eem
Time: 12 January 2023, 11:07:05.451119 am
UUID: 230b9284-70f2-4d4c-a91f-bcffd985a5c6
Ancestors: Monticello-eem.784

Fix two issues with Monticello-eem.782/783. Methods need to be filed out as a category chunk (ended with "! !", not just "!"). Removals need to be handled by the patchOp, not the definition.

=============== Diff against Monticello-eem.784 ===============

Item was changed:
  ----- Method: MCCodeTool>>fileOutDefinition (in category 'menus') -----
  fileOutDefinition
  	"Put a description of the selected definition(s) on a file.
  	 Output the version(s) corresponding to the incoming definition(s), not the versions in this system."
  
  	| index fileName itemsToFileOut |
  	itemsToFileOut := (index := self selection) ~= 0
  							ifTrue: [{items at: index}]
  							ifFalse: [items].
  	items isEmpty ifTrue:
  		[^self].
  	fileName := UIManager default
  					saveFilenameRequest: 'File out on which file?'
  					initialAnswer: (index ~= 0
  										ifTrue: [itemsToFileOut first summary]
  										ifFalse: ['definitions']).
  	fileName isEmptyOrNil ifTrue: [^self].
  	Cursor write showWhile:
  		[| definitionStream |
  		definitionStream := WriteStream on: (String new: 1000).
  		definitionStream header; timeStamp.
  		itemsToFileOut
+ 			do: [:patchOp|
+ 				(patchOp isRemoval ifTrue: [patchOp] ifFalse: [patchOp definition]) fileOutOn: definitionStream]
- 			do: [:patchOp| patchOp definition fileOutOn: definitionStream]
  			separatedBy: [definitionStream cr; cr].
  		FileStream writeSourceCodeFrom: definitionStream baseName: fileName isSt: true useHtml: false]!

Item was changed:
  ----- Method: MCMethodDefinition>>fileOutOn: (in category 'printing') -----
  fileOutOn: aStream
  	"File out the receiver's definition in chunk format.
  	 Override to add the methodsFor: chunk."
+ 	aStream nextPut: $!!; nextChunkPut: self methodCategoryPreambleString; cr.
+ 	super fileOutOn: aStream.
+ 	aStream space; nextPut: $!!!
- 	aStream nextPut: $!!; nextChunkPut: self methodCategoryPreambleString.
- 	super fileOutOn: aStream!

Item was added:
+ ----- Method: MCRemoval>>fileOutOn: (in category 'printing') -----
+ fileOutOn: aStream
+ 	definition isMethodDefinition ifTrue:
+ 		[^aStream nextChunkPut: (String streamContents:
+ 										[:s|
+ 										s nextPutAll: definition className.
+ 										definition classIsMeta ifTrue: [s nextPutAll: ' class'].
+ 										s nextPutAll: ' removeSelector: '.
+ 										s store: definition selector])].
+ 	definition isClassDefinition ifTrue:
+ 		[^aStream nextChunkPut: (String streamContents:
+ 										[:s|
+ 										s nextPutAll: definition className.
+ 										definition classIsMeta ifTrue: [s nextPutAll: ' class'].
+ 										s nextPutAll: ' removeFromSystem'])].
+ 	self error: 'do not know how to file out a removal of this definition'!



More information about the Squeak-dev mailing list