Showing posts with label DiffMerge. Show all posts
Showing posts with label DiffMerge. Show all posts

November 2, 2015

Using WinMerge2011 and DiffMerge in Visual Studio 2013 and 2015

Since the last post related to this topic, I've found a newer version of WinMerge, called WinMerge2011. It's a fork from WinMerge, since WinMerge 2.x hasn't been actively maintained, and WinMerge 3 is still not out yet. Don't let the "2011" scare you, it's being maintained – the latest build came out a couple weeks ago at the time of this writing.

I've also started to use them as portable applications. To use WinMerge2011 in portable mode, just unzip it using 7-zip, and create an empty file named WinMergeU.json in the same folder as WinMergeU.exe.

DiffMerge also works in portable mode if you download the zip package, though I'm not sure if settings are also portable.

The same steps from Visual Studio 2010 and 2012 work in Visual Studio 2013 and 2015:

  1. Go to Tools -> Options to bring up the Options dialog
  2. Go to Source Control -> Visual Studio Team Foundation
  3. Click on "Configure User Tools..."

Add a new entry for WinMerge:

  • Extension: .*
  • Operation: Compare
  • Command: C:\Portable\WinMerge2011\WinMergeU.exe
  • Arguments: /e /x /wl /u /dl %6 /dr %7 %1 %2

Add a new entry for DiffMerge:

  • Extension: .*
  • Operation: Merge
  • Command: C:\Portable\DiffMerge\sgdm.exe
  • Arguments: /m /r=%4 /t1=%7 /t2=%8 /t3=%6 /c=%9 %2 %3 %1

Here's what the Visual Studio options mean:

I actually haven't used WinMerge2011 in a while, except when I need to compare files manually. I've been using the built-in Visual Studio 2015's compare tool lately because of code review integration.

(WinMerge version: 0.2011.005.427. DiffMerge version: 4.2.0.697)

April 8, 2013

Using WinMerge and DiffMerge in Visual Studio 2010 and 2012

(Note: See the new post for Visual Studio 2013 and 2015, and WinMerge2011.)

I use WinMerge for file compare and DiffMerge for merge operations in Visual Studio 2010 and 2012. Here are instructions on how to setup Visual Studio to use those tools.

  1. Go to Tools -> Options to bring up the Options dialog
  2. Go to Source Control -> Visual Studio Team Foundation
  3. Click on "Configure User Tools..."

Add a new entry for WinMerge:

  • Extension: .*
  • Operation: Compare
  • Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
  • Arguments: /e /x /wl /u /dl %6 /dr %7 %1 %2

Add a new entry for DiffMerge:

  • Extension: .*
  • Operation: Merge
  • Command: C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe
  • Arguments: /m /r=%4 /t1=%7 /t2=%8 /t3=%6 /c=%9 %2 %3 %1

WinMerge hasn't been updated in a while, but still very capable, and much better than the VS built-in tool prior to VS 2012.

DiffMerge offers three-pane comparison, which I can't live without when resolving merge conflicts.

I've been using above tools for many years now. Visual Studio 2012 includes improved built-in compare and merge tool, and that might make above not necessary, but I haven't used it much yet as of now.

It would be nice if these tools were a little bit more smarter, such as detecting code block moves -- like Eclipse Java Compare...