Recently I’ve been working with a third party component vendor to resolve a defect. They requested that I create a sample project illustrating the issue and send it to them as a zip archive. Building the project was easy but I didn’t want to send all of the extra stuff that goes along with it. In other words, I wanted a snapshot of the current revision but without the source control bindings. I knew how to do this with Subversion but how did Mercurial handle it?
Since I started using Mercurial a few months ago I’ve fallen in love with it. There was a bit of a learning curve for getting up and running but I found that the Tortoise tools are really intuitive and eliminated some of the pain. Most importantly though, Mercurial addresses the single biggest problem I had when working away from home – no repository access.
When my team reverted back to Subversion the first thing I missed was the Visual Studio integration from TFS. CollabNet provides AnkhSVN to fill that gap by exposing most common source control operations directly through the IDE. I’ve been using AnkhSVN successfully for a few months but one thing that always bugged me was the default compare tool. I love WinMerge and the default merge and compare tool just didn’t, well, compare. Thankfully the merge and compare tools thank AnkhSVN uses are configurable.
- External Diff
- External Merge
- External Patch
Not only does AnkhSVN provide a list of popular tools including WinMerge and KDiff, it also attempts to determine if any of them are installed and marks any it can’t find with “(Not Found)”. To change the tool just select it from the list or enter the path to your favorite utility.
Each of the tools are preconfigured to run with a fairly thorough set of arguments but if we want to customize them we can click the corresponding ellipsis button to open the Command Editor. AnkhSVN uses the macro paradigm to inject a variety of variables into the argument list for the selected editor. Its macros follow the traditional $(name) format so it should look familiar to anyone familiar with configuring external tools from Visual Studio’s Tools menu.
Ever since I found these settings and replaced the default tool with WinMerge I’ve been much happier. AnkhSVN is a much more natural extension of my workflow than TortoiseSVN so being able to use WinMerge simplifies the process immensely.