The Trunk: Monticello-mt.632.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Monticello-mt.632.mcz

commits-2
Marcel Taeumel uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-mt.632.mcz

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

Name: Monticello-mt.632
Author: mt
Time: 12 May 2016, 4:42:54.059309 pm
UUID: 9611f9ba-d971-1e45-be48-9036bfa2738a
Ancestors: Monticello-ul.631

Add custom warnings to support ignoring the loading of empty (diffy) versions via #on:do:.

=============== Diff against Monticello-ul.631 ===============

Item was added:
+ MCEmptyVersion subclass: #MCEmptyDiffyVersion
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Monticello-Storing'!

Item was added:
+ ----- Method: MCEmptyDiffyVersion class>>signal (in category 'exceptionInstantiator') -----
+ signal
+
+ self signal: 'About to serialize an empty diffy version.' !

Item was added:
+ Warning subclass: #MCEmptyVersion
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Monticello-Storing'!

Item was added:
+ ----- Method: MCEmptyVersion class>>signal (in category 'exceptionInstantiator') -----
+ signal
+
+ self signal: 'About to serialize an empty mcz version.'!

Item was changed:
  ----- Method: MCMcdWriter>>writePatch: (in category 'visiting') -----
  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: [ MCEmptyDiffyVersion signal ].
- (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'!

Item was changed:
  ----- Method: MCMczWriter>>writeSnapshot: (in category 'visiting') -----
  writeSnapshot: aSnapshot
+ aSnapshot definitions ifEmpty: [ MCEmptyVersion signal ].
- 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'!