[Pharo-project] Pavel? ChangeSorter vs ChangesOrganizer

Stéphane Ducasse stephane.ducasse at inria.fr
Fri Sep 11 15:29:40 EDT 2009


Hi Pavel

I have the impression that

MCPackageLoader>>useChangeSetNamed: baseName during: aBlock
	"Use the named change set, or create one with the given name."
	| changeHolder oldChanges newChanges |
	changeHolder := (ChangeSet respondsTo: #newChanges:)
						ifTrue: [ChangeSet]
						ifFalse: [Smalltalk].
	oldChanges := (ChangeSet respondsTo: #current)
						ifTrue: [ChangeSet current]
						ifFalse: [Smalltalk changes].

	newChanges := (ChangeSorter changeSetNamed: baseName) ifNil:  
[ ChangeSet new name: baseName ].
	changeHolder newChanges: newChanges.
	[aBlock value] ensure: [changeHolder newChanges: oldChanges].


should use Changes

MCPackageLoader>>useChangeSetNamed: baseName during: aBlock
	"Use the named change set, or create one with the given name."
	| changeHolder oldChanges newChanges |
	changeHolder := (ChangeSet respondsTo: #newChanges:)
						ifTrue: [ChangeSet]
						ifFalse: [Smalltalk].
	oldChanges := (ChangeSet respondsTo: #current)
						ifTrue: [ChangeSet current]
						ifFalse: [Smalltalk changes].

	newChanges := (ChangesOrganizer changeSetNamed: baseName) ifNil:  
[ ChangeSet new name: baseName ].
	changeHolder newChanges: newChanges.
	[aBlock value] ensure: [changeHolder newChanges: oldChanges].

It would be coherent not to really on UI (changeSorter) but on the  
domain objects (changeOrganizer).

http://bugs.squeak.org/view.php?id= 4825

Stef









More information about the Pharo-dev mailing list