9.3 The Change Set

On a fresh Cuis-Smalltalk installation, each code you edit in the System Browser is recorded in a Change Set,

You browse a change set with a tool named the Change Sorter: ...World menu → Changes...Change Sorter...

ch10-ChangeSet1

Figure 9.3: The Change Sorter, class edit

The TheBook class we added to Cuis-Smalltalk in the previous section is a change made to the core of the system. By default, it is recorded in a change set automatically created by the system. In Figure 9.3 at the top right, observe the class TheBook, it belongs to a change set named 4439-CuisCore-AuthorName-2020Nov16-13h40m. In the left pane, each unsaved change set is marked with a --->. Here it tells us the change was not saved on disk. To save the change set, just use its contextual menu and use one of the file out entries. The change set will be saved along the Cuis-Smalltalk image under its system name with AuthorName substituted with the real author name.

ch10-ChangeSet2

Figure 9.4: The Change Sorter, method edit

Observe Figure 9.4, after we added the method pages to the TheBook class, the middle pane lists the added or modified methods. When a method is selected its source code is printed in the bottom pane.

Let’s say we save the change set – File out entries in the change sorter tool menu. This creates a new file 4451-CuisCore-HilaireFernandes-2020Nov14-21h08m-hlsf.001.cs.st along the Cuis-Smalltalk image file:

From Cuis 5.0 [latest update: #4450] on 18 November 2020 at 9:05:09 am'!
!classDefinition: #TheBook category: 'TheCuisBook'!
Object subclass: #TheBook
   instanceVariableNames: ''
   classVariableNames: ''
   poolDictionaries: ''
   category: 'TheCuisBook'!

!TheBook methodsFor: 'as yet unclassified' stamp: 'hlsf 11/18/2020 09:04:58'!
pages
   ^ 151! !

Example 9.1: Change set contents

To load this change set back in a new image, you use the File List tool ...World menu → OpenFile List... Browse the folder containing the change set file to load, then select it, from there you have three options to manipulate it.

ch10-FileListChangeSet

Figure 9.5: The File List tool, to install a change set and more

The change set way of managing the source code is used by the developers of Cuis-Smalltalk, to work on its core image. When you want to write an application, a dedicated tool or even a set of classes covering a specific domain, you really want to use something else to manage the code: a package.