Thursday 31 January 2008

Well, it's certainly colourful...

I use to use TortoiseSVN a lot. It is the inspiration for LizardTF. I was pretty good at branch management and use to do the hard to keep up with merges for some of my colleagues. I quite liked the 3-way diff/merge tool, but could never understand all the colours. It seemed to have hundreds, and I never found a key.

Zoom forward a year and a bit, I use TFS at work now, I hate the Microsoft merge tool, so I'm writing a fresh one. I've got the two-way diffs all sorted (should be released this weekend) and I'm feeling all cocky, I can read the diff3 output, and I'm ready to go...

So you've got add, deletes and changes, easy. You have changes which are the same in both server and local files, you don't have to anything with these, easy. You have changes only on the server, these can merge straight into the local target, still easy. You have different changes to server and local, mark it up as a conflict, still pretty easy. These conflicts can be any of the three types on either side. Arrrggghhh! How many variations of add, deletes and changes do you end up with? Loads. How many colours do you need to clearly identify them all? Too many!

Here is the V0.1 LizardTF 3-way-diff visualiser. Base/Server changes shown inline on the left, Base/Local changes shown inline on right. Green for inserts, Blue for changes, Red for deletions, pale shades where the same change has already been made to both server and local. Mid colours for changes on the server which are mergeable (no change on local/local matches bases), and dark colours with yellow text and square glyphs for your actual, needs intervention, conflicts. Plus the usual mark up of base/local changes*.

So there you go. No wonder TortoiseSVN was rather colourful.

Scintilla also offers quite nice TipText, so hovering over a marked area will display a pop-up text describing the meaning of the colours. (not shown).


*Only if the local target shares the base with the server. With LizardTF it will be possible to merge changesets/diffs into any target irrespective of origin.

No comments: