View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Know Thy Enemy - Merging In VisualWorks & Related Tips

Getting shafted by a bad merge 20 minutes before a milestone is due is a real pain. Here's some tips for dealing with VisualWorks's merge functionality so this disaster doesn't happen to you:

If you've been spoiled by TortoiseSVN/CVS or the likes with a pretty file merger for dealing with conflicting commits, get ready for the pain that is the Merge Tool in VisualWorks. It lacks the ability to merge two sets of code into one preserving the changes in both, so you are forced to pick which set of code you want to merge into your image. With this in mind, your team should setup responsibilities for who owns/manages sections of your code to prevent the same thing being edited by two people at the same time, as this will result in a merge conflict that you get to figure out. So long as your team communicates who is working on a particular set of code, you can avoid the nightmare that is merging.

Stay up to date with the repository when working on code. VisualWorks is easily confused and if your code is too old it sometimes thinks there's no common ancestor, which results in an EPICFAIL (merge won't even work) and a lot of work on your part to reapply any changes to a clean revision of your code from the repository (You have to checkout a copy of your code from the repository when VisualWorks thinks your existing code lacks a common ancestor with the code in the repository). File out your code to a source tree (.st) before committing any code, incase something goes wrong. In fact, file out your code often ("Save and save often") - Images can disappear if VisualWorks crashes and sometimes there are exceptions that prevent you from even getting to the file out dialog (Primitive error anyone?). There's always the changes file when something goes wrong, but that's not perfect and it can be time consuming. Saving your code often helps you to avoid the nightmare of reconstructing your code when VisualWorks inevitably tries to destroy your code.

Links to this Page