[Pkg] The Trunk: Monticello-cmm.591.mcz

commits at source.squeak.org commits at source.squeak.org
Thu May 8 15:56:15 UTC 2014


Chris Muller uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-cmm.591.mcz

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

Name: Monticello-cmm.591
Author: cmm
Time: 8 May 2014, 10:55:44.391 am
UUID: 6b6f713b-64d7-4ba9-a50d-818547fabcbc
Ancestors: Monticello-cmm.590

- Fix false positive warning about serializing empty packages.

=============== Diff against Monticello-cmm.590 ===============

Item was changed:
  ----- Method: MCMcdWriter>>writePatch: (in category 'visiting') -----
+ writePatch: aPatch 
- writePatch: aPatch
  	| old new |
  	old := OrderedCollection new.
  	new := OrderedCollection new.
  	aPatch operations do:
+ 		[ : ea | ea isRemoval ifTrue: [ old add: ea definition ].
+ 		ea isAddition ifTrue: [ new add: ea definition ].
+ 		ea isModification ifTrue:
+ 			[ old add: ea baseDefinition.
+ 			new add: ea definition ] ].
+ 	(old isEmpty and: [ new isEmpty ]) ifTrue: [ Warning signal: 'About to serialize an empty diffy version.' ].
+ 	self
+ 		 writeOldDefinitions: old ;
+ 		 writeNewDefinitions: new ;
+ 		
+ 		addString: (self serializeInBinary: aPatch)
+ 		at: 'patch.bin'!
- 		[:ea |
- 		ea isRemoval ifTrue: [old add: ea definition].
- 		ea isAddition ifTrue: [new add: ea definition].
- 		ea isModification ifTrue: [old add: ea baseDefinition. new add: ea definition]].
- 	self writeOldDefinitions: old.
- 	self writeNewDefinitions: new.
- 	self addString: (self serializeInBinary: aPatch) at: 'patch.bin'.!

Item was changed:
  ----- Method: MCMczWriter>>serializeDefinitions: (in category 'serializing') -----
  serializeDefinitions: aCollection
- 	aCollection ifEmpty: [ Warning signal: 'About to serialize an empty package.'].
  	^String streamContents: [:aStream |
  		| writer |
  		writer := self snapshotWriterClass on: aStream.
  		writer writeDefinitions: aCollection]!

Item was changed:
  ----- Method: MCMczWriter>>writeSnapshot: (in category 'visiting') -----
+ writeSnapshot: aSnapshot 
+ 	aSnapshot definitions ifEmpty: [ Warning signal: 'About to serialize an empty mcz version.' ].
+ 	self
+ 		
+ 		addString: (self serializeDefinitions: aSnapshot definitions)
+ 		at: 'snapshot/source.' , self snapshotWriterClass extension
+ 		encodedTo: 'utf8' ;
+ 		
+ 		addString: (self serializeInBinary: aSnapshot)
+ 		at: 'snapshot.bin'!
- writeSnapshot: aSnapshot
- 	self addString: (self serializeDefinitions: aSnapshot definitions) at: 'snapshot/source.', self snapshotWriterClass extension encodedTo: 'utf8'.
- 	self addString: (self serializeInBinary: aSnapshot) at: 'snapshot.bin'!



More information about the Packages mailing list