Saturday, March 19, 2005
Subversion merge tools

After a week of playing with svn on and off, I'm convinced it's the right choice for me. Changing my thoughts on version control took a bit, but the optimistic locking style of thinking has quickly grown on me. We are in the final testing stages at work, and I'm hoping we get through the migration next week. Sweet.

One thing we are still looking at are merge tools. Although we expect conflicts to be the exception, we wanted to make sure we had a solid understanding of the merge process, and the tools available to manage it. For those not familiar with how svn handles a conflict, it is actually quite simple. Right before you are going to commit a changeset (check in), you update (get latest) your existing working set. At this time, you are notified if any of the files you are going to commit conflict with existing files in the repository. Physically in your file system, you have a number of files to review: The original file, your changed file, and the file that is currently in the repository.

When you ask Tortoise to update your working set, it will display what has changed, and alert you of any conflicts. Directly from that dialog, you can launch a merge tool to assist in reviewing those files I was talking about. We have been evaluating some tools to be used here, and here are my initial thoughts. I only tested 3 paned merge tools we could find.

Tortoise Merge

Tortoise Merge is built right into tortoise, and certainly should not be shrugged off. It allows for you to see all 3 of the versions very easily, and very quickly pick which version you would like to keep via it's 3 pane layout. You can also directly resolve the changes (which tells svn you are ready to commit) right from within the ui. For very basic operations, this tool does very well.

The tool does have some shortcomings though. It does not allow you to edit the the files manually in case you so wanted. You can also only see that a line has changed, not what in that line has changed. It's a great built in tool for basic operations.

Araxis Merge

Araxis merge is a commercial product with a pretty hefty price tag, but has the features and capabilities to be worth it. It is certainly the most feature rich merge tool I evaluated. Araxis makes it very simple to find all of the conflicts by line, and also notes the exact section of the line that is in violation. The files can also all be edited inline.

Although feature rich and capable, I found the interface clumbsey, and difficult to use. Although powerful, I'm really looking for quick in this instance.

Tortoise settings : "C:\Program Files\Araxis\Araxis Merge v6.5\compare" /wait /a3 /3 /title1:"Mine" /title2:"Theirs" /title3:"Base" %mine %theirs %base %merged

Perforce P4WinMerge

Perforce offers a nice merge tool that works quite well also. This merge tool is free, but I want to read the license very well before I suggest it to the company. The tool is very nice, and simple to use as well. It makes simple work of choosing which version of the file you want to use from all of the available revisions, as well as edit the file inline.

P4WinMerge does not however show where in the line the change is, only showing that the line is different. The only other shortcoming I can think of is there could be some license implications, as I saw a couple posts somewhere about being careful with corporate usage.

Tortoise settings : C:\Program Files\Perforce\P4WinMrg.exe %base %theirs %mine %merged

Guiffy

Guiffy is a java based commercial app with a very reasonable price. Being a java app I was worried about a performance issue that some java ui's suffer from, but was pleasantly surprised with it's performance. It is extremely full featured, closely rivaling the featureset of Araxis. I feel Guiffy does not suffer from the same UI complexities of Araxis, though, presenting your versions in a very clean and easy to understand manner. Guiffy also makes it very simple to choose between your current version, and the version from the repository, as well as edit the file inline.

The only complaint I have with Guiffy is its support for the original file. The only way I could find to see the original file is to right click on the top pane, and choose view parent. The view parent dialog box also does not allow you to use that revision. Although I think it would be a rare occasion you would want to roll to the original version of a file, the only way I could see to do that was view the parent, copy the change, and paste it inline in the merge window.

Tortoise settings : C:\Program Files\guiffy70\guiffy.exe -s %mine %theirs %base %merged

KDiff

Thanks Darrell Norton for pointing out kdiff which somehow flew beneath my radar. KDiff is a cross platform open source 3 paned diff tool. I grabbed 0.9.88, which is dubbed as a "beta" set of bits. After swapping out my tortoise settings, I quickly came to realize this tool is exactly what we were looking for.

KDiff fills in all the holes, where the other apps I reviewed seemed to all miss at least 1 hole, for what I'm looking for. Please remember, the context of this review is quick and easy merge based on a svn conflict. And KDiff fits the bill perfectly. It allows the user to see where in the line the change is, as well as inline editing, while showing all 3 versions of the file right there. In just the first 5 minutes I knew this tool would bit the bill perfectly. The only changes I made to it's out of the box config was changing the font (man I love profont 8pt), and turning off the .orig file creation.

Tortoise settings : C:\Program Files\KDiff3\kdiff3.exe %base %theirs %mine -o %merged

Final thoughts

At this point I am leaning towards recommending Guiffy. I feel it's features, and low cost are a good fit for what we may need. Although not as powerful as Araxis, I think it will be much faster and more intuitive to work in. I would suggest reviewing all of the tools, though, since they all have pluses and minutes that may fit better into your environment.

Wow I'm sold on kdiff. It certainly doesn't have the power of araxis, but it's intuitive interface greatly makes up for it. The featureset is also quite adequate for what we are looking for. I would still highly suggest reviewing all of the tools, but will also say keep kdiff for last, since I really think it will fit the bill in most cases where developers want to review merge conflicts.

Edit 03.21.05@14.32 [Added Kdiff/ Changed Final Thoughts]



3/21/2005 11:25:06 AM (Eastern Daylight Time, UTC-04:00)
What about KDiff3?
http://kdiff3.sourceforge.net/
3/21/2005 12:11:52 PM (Eastern Daylight Time, UTC-04:00)
KDiff totally flew below my radar. Downloading now. Thanks for the tip, I'll add it to the post once I get a chance to review it!
3/21/2005 5:37:03 PM (Eastern Daylight Time, UTC-04:00)
Glad it worked for ya!
4/1/2005 8:01:11 PM (Eastern Daylight Time, UTC-04:00)
You might want to check out Winmerge also:

http://winmerge.org/
4/2/2005 12:39:06 PM (Eastern Daylight Time, UTC-04:00)
I actually use winmerge quite a bit, but I was only looking at 3 pane merge tools that can handle a multiple file merge. The tools had to be able to support 3 versions of a file (base, mine, what I conflicted with), and make it easy to output to the appropriate file.
9/6/2005 11:11:41 PM (Eastern Daylight Time, UTC-04:00)
Authors of Ultraedit also made a seems-to-be-quite-promising comparison tools, UltraCompare. Have not tried on it though as I don't have such complicated requirement as yours. You may want to have a try too :)

In fact I am also trying out kdiff, in order to see if I really want to pay for UltraCompare :P
Alien


Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):