Friday, January 29, 2010

Using meld as your external merge tool for subversion (svn)

updated 2/19/2010
 
I don't know about you, but I am not a fan of SVN's built-in merge tool. Nor do I much care for GNU diff3, which subversion's tool seems to mimic. The diffs are presented inline in a simple text editor. It's simple, it works, but it's not exactly user-friendly.

So maybe you've used Meld. Meld provides a great, easy-to-use GUI for doing merges. If you're familiar with it, then you know what I'm talking about. If you're not, check it out Meld's sourceforge page, which includes screenshots. The key for me is the side-by-side view, but there are other great features like single clicks to move changes between files, syntax highlighting, and line numbering, to name a few.

So the question is, how can I use Meld to manage all my svn merge conflicts? Luckily, subversion allows you to call upon an external editor, as they explain in the subversion book (Using External Differencing and Merge Tools in Chapter 7).

Despite the examples provided in the subversion book, I wasn't quite sure how to get this to work. I was even more confused after following some examples I found on the web, not understanding the problems that arose. So that's why I'm writing this blog entry. I hope it helps.

Hit the jump for the complete solution: