DiffMerge is yet-another-diff-and-merge-tool from the fine folks at SourceGear. It’s awesome. It’s head and shoulders above whatever junky diff tool they provided with your source control platform, unless of course you’re already using Vault. Eric Sink, the founder of SourceGear, wrote about it here. By the way, Eric’s blog is easily one of the most valuable I’ve read, and while it doesn’t get much love these days, there’s a lot of great stuff there, and it’s even worth going back and reading from the beginning if you haven’t seen it.
Are there better diff tools out there? Sure, there probably are. I’m sure you have your favorite. If you’re using something already that works for you, great. DiffMerge is just yet another great option to consider when you’re getting started.
Yeah, I probably do, but I don’t work for SourceGear and have no financial interest in their products. I’ve just been a very happy user of Vault and DiffMerge for years. And it if increases Vault adoption, both among development shops and development tool vendors, it will make my life easier.
But when I go to work on long-term contracts for large clients, they already have source control in place that they want me to use, which is OK, but when I need to do some merging, it starts getting painful. I want it to tell me not just that a line changed, but exactly what in that line changed. I want to it actually be able to tell me the only change is whitespace. I want it to offer me a clean and intuitive interface. Crazy, I know.
Not a huge problem because DiffMerge is free, and it can plug into just about any source control system, replacing the existing settings. However those settings can be tricky to figure out, so I figured I’d put together a cheat sheet of how to set it up for various platforms.
Let’s start off with those in greatest need, ye old SourceSafe users. First and foremost, I’m sorry. We all feel bad that you are in this position. SourceSafe was great for what it was, 15 years ago when file shares were considered a reliable data interchange format, but nobody should have to suffer through SourceSafe in this day and age. But don’t worry, adding in DiffMerge can add just enough pretty flowers to your dung heap of a source control system to make it bearable. Just like getting 1 hour of yard time when you’ve been in the hole for a week, it gives you something look forward to.
Anywho, let’s get started. First, whip out your SourceSafe explorer:
Here’s what we get for a standard VSS diff:
Ugh. So go to Tools->Options and go to the Custom Editors Tab. From there, the following operations:
Operation: File Difference
File Extension: .*
Command: [DiffMergePath]\diffmerge.exe –title1=”original version” –title2=”modified version” %1 %2
Operation: File Merge
File Merge: .*
Command: [DiffMergePath]\diffmerge.exe –title1=”source branch” –title2=”base version” –title3=”destination branch” –result=%4 %1 %3 %2
Now here’s our diff, much less painful:
But merging is where it really shines:
Thanks to Paul Roub from Source Gear for the details: http://blog.roub.net/2007/11/diffmerge_in_vss.html
Obviously SVN is worlds better than VSS, but some of the standard tools distributed with TortoiseSVN are a little lacking. You might say “you get what you paid for,” but you’d only say that if you wanted to tick off a lot of smart and helpful people.
So let’s take a look at a standard diff in SVN: