next back next

Using the Changes Browser

Index

Introduction

Smalltalk/X keeps track of all your changes made to either the class hierarchy or to individual methods in a file called 'changes'. For each change, one record (i.e. one chunk in fileOut-format) is appended to this file (*).

The changesBrowser allows inspection and manipulation of this file. It consists of 2 subviews; which are:

The change list shows a list of all changes in chronological order.
To see a change, select (i.e. click on) the corresponding line in the changelist. The change will be displayed in the contents view. Dont be afraid using the changesBrowser, the changes file remains unmodified unless you execute the "writeback change file" function from the changelists popup-menu.

The text shown in the contents view is readonly - changes cannot be changed.

The accept function of the contents view has been redefined to perform an apply change (see below).

A changeBrowser can be started either from the launcher (it is found in the "Browsers" submenu), or by evaluating the expression:

	ChangesBrowser open
in a workspace. Use of the changesBrowser is not limited to the 'changes' file; any file which contains expressiones in changefile-format can be manipulated.
For example, a browser on the 'patches' file is opened with:
	ChangesBrowser openOn:'patches'
Also, integration/merge of other peoples changefile into your current environment is done this way.

Change list menu functions

The top part of the changes browser is called changelist view and offers the following functions in its popup menu:

Recovering after a crash

After a crash of Smalltalk/X, you should use a changesBrowser to reapply all changes made. Usually, you would look for the last "snapshot"-entry in the change list and apply all changes after that one up to the end. If the crash was caused by one of those changes (for example, you redefined a system method), the best approach is to manually apply individual changes upto, but excluding the 'bad'-one..

Keeping the change-file small

Since the change file grows over time (while programming), and having a big changefile slows down the ChangesBrowser startup, old changes should be removed from time to time.
To do this, classes should be filed out completely and all changes for that class be removed.

Also a regular compress (which removes all old changes for a method, just leaving the newest one) helps to keep the change file smaller.

Notes:

(*)

By default, the system only adds changed class and method definitions to the changefile. Expressions evaluated by the "doit" function are not appened. (to keep the changefile from growing too fast).
If you want doits to be remembered too, execute:
    Smalltalk logDoits:true
in a workspace or add it to your startup file ('smalltalk.rc' or 'private.rc').

Copyright © Claus Gittinger Development & Consulting, all rights reserved

(cg@ssw.de)