Living With Subversion (Part 3)

Please note that this post was migrated to my new blog platform. There may be bad formating, broken links, images, downloads and so on. If you need an item on this page, please contact me and I will do my best to get it from my backups.

~E

In part three of Living with Subversion, we cover one of the biggest reason of this series: Using a different Merge Tool.

Merging conflicts using SourceGear Vault Client’s DiffMerge

Now onto one of the most useful tidbits of this article, using the trusty SGDM tool that is included with SourceGear Vault Client installation.  I have been using SourceGear Vault Client 3.1.9 for a while now, so I am writing using that version.  I know 3.5.x and 4.0 has been released, but our last version of SGV was 3.1.x so that’s what I am used to.

Once installed, you do not have to do anything to the client.  Instead, it’s all about setting up Tortoise to use it as the merge tool.

Note: TortoiseSVN does come with its own DiffMerge tool.  Maybe it is me too busy coding, or not spending enough time resolving conflicts, but I just cannot stand TortoiseSVN’s version.  Hence this topic.  I am very use to SGV’s robust version.

 

TortoiseSVN-DiffViewer

Diff Viewer Dialog

First, click the Diff Viewer on the left and select the “External” option.  Next find/note the location of your Vault Client directory.  There should be a sgdm.exe file here.  Change the Diff Viewer (you will want to keep the quotation marks too) location to:

“C:\Program Files\SourceGear\Vault Client\sgdm.exe” %mine %base

Making sure the path matches obviously.  This will put your local copy in the left panel and the repository’s version in the right panel.

 

TortoiseSVN-MergeTool

Merge Tool Dialog

Next click the Merge Tool on thee left and select External once again.  Using the same location of the sgdm.exe as above, paste it in.  But this time, the command-line arguments are a good bit longer:

“C:\Program Files\SourceGear\Vault Client\sgdm.exe” /result:%merged /title1:%yname /title2:%mname /title3:%tname %mine %merged %theirs

This will put your working version on the left panel, the repository’s version in the right panel, and the TortoiseSVN’s merged version in the center.

The trick is that now you can use SGV’s DiffMerge tool, easy color coding and replace options that you are used to, overriding the TortoiseSVN’s merged (and often broken) result area highlighted in bright yellow as shown below.

TortoiseSVN-DiffViewer

SGV Client’s SDMG.exe opened by TortoiseSVN after a conflict

The Unified Diff Viewer is a viewer for CVS patch files.  By default on Windows, TortoiseSVN uses Notepad.  Tip: Upgrade to Notepad2 for you local notepad.exe in windows.

Continue to Part 4

Living with Subversion (Part 3)

 

> Revision History
> About the author