Last updated at 1:05 am UTC on 17 January 2006
ConflictChecker is a utility written by Doug Way. It's available for download from SqueakMap.
Description from the SqueakMap entry:
Given a changeset filename, you can use the ConflictChecker to check an older .cs/.st file for conflicts with methods from more recent update-changesets in your image. Its output is displayed in a Transcript window.
Example usage: 'FilePackage conflictsWithUpdatedMethods: 'MyChangeSet.cs'.' Or, use the 'conflicts with updated methods' menu item or 'conflicts' button in the FileList window.
The ConflictChecker doesn't just check to see which methods in a changeset would overwrite methods in the image... it actually checks to see if there have been more recent updates to the image since the changeset was created, in which case the more recent methods would be overwritten by older methods from your changeset if you filed it in, which would likely break things. It's basically a 3-way conflict check. It uses the latest update # from the .cs/.st file header as a basis for comparison.
Generally, you should use a freshly updated image to do this, and the image should have update-changesets going as far back as possible (at least as far back as the changeset you want to test). Something like the "jumbo changes" image at ftp://st.cs.uiuc.edu/Smalltalk/Squeak/testing/Squeak3.6a.from3.0.zip, freshly updated, would be ideal if you were looking at older changesets from around the time of 3.0 or 3.2.
Step by step instructions on using the ConflictChecker:
- Start with a freshly-updated alpha image, which has updates going back to at least 3.4 in the changesorter. (Or use an updated "jumbo changes" image as described above.)
- Install the latest ConflictChecker from SqueakMap.
- Open a FileList, and select the changeset you want to check.
- Hit the "conflicts" button or select the "conflicts with updated methods" pop-up menu item.
- Look at the resulting output in the Transcript window.
If you have multiple changesets to check and you also want to check for conflicts between the changesets themselves, do this:
- Check conflicts for the first changeset.
- Install the first changeset.
- Check conflicts for the second changeset.
- Install the second changeset.
Sample output from the ConflictChecker:
From the transcript window, checked in a 3.6alpha-5259 image:
Checking TrueTypeTextStyle5.cs (#5170) for conflicts with more recent method versions...
...checking CanvasEncoder class>>nameForCode:
CONFLICT found for CanvasDecoder>>processCommand:onForceDo: with newer changeset 5240MCP-Complete
...checking StrikeFont class>>fromUser:
...checking Utilities class>>fontMenuForStyle:target:selector: 1 conflict found.
This tells us a few things about the TrueTypeTextStyle5.cs changeset:
- First is that our changeset is a few months old, written at the time of 3.6alpha-5170.
- Second is that the changeset overwrites 11 methods in the image... these are the methods listed as being checked.
- Third and most important is that an update 5240MCP-Complete (more recent than 5170) has changed one of the same methods that our changeset overwrites (CanvasDecoder>>processCommand:onForceDo:), thus we have a conflict which must be resolved. We'll probably need to merge the changes by using a Versions Browser.
Question: March 08, 2004 I'm using conflict checker to migrate morphic wrapper to 3.7. Now I see that when I compute the conflicts there are some conflicts that I see using the browse code that are not caught by conflict checker. Do you only check within the udpates or check also the complete image?
Answer: Doug Way The ConflictChecker only checks within the updates (actually all changesets) which appear in the changesorter after the update # for the file you are checking. Normally, this should find all of the conflicts.
It is important that the changeset file has the correct update number for the image version that it is compatible with. (Which it normally does, unless somebody later filed it in and filed it out of the "wrong" image.) So, what is the update number in the header for the morphic wrapper changeset you're working on?
As an example, let's say that the morphic wrapper changeset is from 3.6 final. So, the header would look like this: 'From Squeak3.6 of ''6 October 2003'' [latest update: #5424] ...'
This means that it would check for all conflicts with any changesets which appear above changeset #5424 in the changesorter. (This includes all of the more recent updates, plus any other changesets you might have loaded.)
If there are changes in the image that you made in browsers, or filed in via .st files, or loaded via project files, I guess those wouldn't show up. Perhaps that is the problem?