A new version of DeltaStreams-Model was added to project DeltaStreams: http://www.squeaksource.com/DeltaStreams/DeltaStreams-Model-gk.13.mcz
==================== Summary ====================
Name: DeltaStreams-Model-gk.13 Author: gk Time: 30 June 2009, 1:19:51 am UUID: aafd211b-46b1-48fb-805b-90ed40547660 Ancestors: DeltaStreams-Model-gk.12
Some fixes related to DSDelta>>changes and changeSequence.
=============== Diff against DeltaStreams-Model-gk.12 ===============
Item was added: + ----- Method: DSChangeSequence>>select: (in category 'enumerating') ----- + select: aBlock + ^ self changes select: aBlock!
Item was changed: ----- Method: DSDelta>>changes (in category 'accessing') ----- changes + ^ changeSequence changes! - ^ changes!
Item was changed: ----- Method: DSVisitor>>applyDelta: (in category 'composite changes') ----- applyDelta: aDelta "Treat like a composite change by default." + ^ self applyCompositeChange: aDelta changeSequence! - ^ self applyCompositeChange: aDelta changes!
Item was changed: ----- Method: DSDelta>>normalize (in category 'applying') ----- normalize "Modify changes so that they are compacted into the minimal form still producing the equivalent end result. In other words - remove redundancy."
+ changeSequence ifNotNil: [ + changeSequence moveClassNameChanges; removeShadows; mergeChanges]! - changes ifNotNil: [ - changes moveClassNameChanges; removeShadows; mergeChanges]!
Item was changed: ----- Method: DSDelta>>initialize (in category 'initialize-release') ----- initialize super initialize. + changeSequence := DSChangeSequence new. - changes := DSChangeSequence new. changeCounter := 0. uuid := UUID new!
Item was added: + ----- Method: DSDelta>>changeSequence (in category 'accessing') ----- + changeSequence + ^ changeSequence!
Item was changed: DSAnnotatedObject subclass: #DSDelta + instanceVariableNames: 'changes uuid changeCounter changeSequence' - instanceVariableNames: 'changes uuid changeCounter' classVariableNames: '' poolDictionaries: '' category: 'DeltaStreams-Model-Base'!
+ !DSDelta commentStamp: 'gk 6/30/2009 00:12' prior: 0! - !DSDelta commentStamp: 'gk 6/29/2009 21:54' prior: 0! A Delta is much like a ChangeSet but improved and simplified. It can capture changes like a ChangeSet does (see #event:), but unlike ChangeSets multiple Deltas can be logging changes at the same time. A Delta maintains a chronologically ordered collection of change objects that is a true log unlike a ChangeSet which tries to normalize changes on the fly and does not maintain an order.
Also - each change object carries more information than a record in a ChangeSet does - and they know how to produce their anti change which in turn gives a Delta the ability to produce its own anti Delta. Such an anti Delta can be used to revert a Delta.
Instance variables:
+ changeSequence - an instance of DSChangeSequence. - changes - an instance of DSChangeSequence. uuid - created when I am first instantiated, never changed. changeCounter - a counter to ensure strict sorting of changes, timestamps are not sufficient.
Standard properties:
#revertable - if missing we presume true. Can be used to explicitly flag a Delta as revertable/not revertable. !
Item was changed: ----- Method: DSDelta>>= (in category 'comparing') ----- = aDelta "Two deltas are considered equal if they contain the same change sequence."
+ ^changeSequence = aDelta changeSequence ! - ^changes = aDelta changes !
packages@lists.squeakfoundation.org