[tip] Use WinMerge for compare / merge in SourceGear Vault

I previously blogged about how to use WinMerge as the diff tool in StarTeam. Diff / Merge against source control is something I do very frequently, so I think it's worth the few minutes to use the best possible tool. I've been a fan of WinMerge for a while, so when I started using SourceGear Vault this post was pretty much inevitable.

So, here's how you set this up:

  1. Download WinMerge. I know it sounds kind of crazy to use experimental builds of a diff / merge tool, but these guys have been putting out very high quality releases for years and their betas are better than most finished products, so if you're feeling lucky go with the latest experimental build.
  2. In Vault: Tools > Options > Diff/Merge tab.
  3. Diff Program and Merge Program fields: Path to your WinMerge.exe (or WinMergeU.exe if you need Unicode support). Default is C:\Program Files\WinMerge\WinMerge.exe\
  4. Diff Arguments: /dl "%LEFT_LABEL%" /dr "%RIGHT_LABEL%"  "%LEFT_PATH%" "%RIGHT_PATH%"
  5. Merge Arguments: /dl "%WORKING_LABEL%" /dr "%OTHER_LABEL%" "%WORKING_PATH%" "%OTHER_PATH%" "%DEST_PATH%"

More info on the WinMerge commandline args here.
More info on the Vault Diff/Merge Options here.

Oh, and one other Vault tip - use CRC's to determine changed files when working in CVS mode. Otherwise I end up with tons of files that say they're changed, but aren't. You can set that via Tools > Options > Local Files > Check "Detect Modified Files using CRCs instead of modification times"

6 Comments

  • And I still respect your opinion. I usually only argue with you because it's the best way to got get me some schoolin'.

  • It's mostly usability and UI related, which I COMPLETELY agree with:



    --

    Sometimes you come across a program that seems to be one step ahead of you, anticipating your need and surprising you by implementing features you cross your fingers and wish for when you go looking in the options dialog. Such programs are rare, and when you find one it's like making a new friend.



    Beyond Compare is one of those rare gems that doesn't just blow the competition away in terms of features, but manages to pack all of these features into a user interface that is a joy to use. This is not an inconsequential issue or a trivial thing for a program to get right.

    --



    Programmer tools-- not so much known for their helpful UI. And a little part of me dies inside when I look at the WinMerge screenshots. Designed by programmers, for programmers.



    Why don't you give the 30-day trial a shot and then come back and tell us how much it sucks?

  • All right, that's it. After school, by the bike rack. Richard Hale Shaw will be with me, bring whoever you'd like...



    Oh, and you know that little part of you that dies when you see the WinMerge screenshots? It's just your gall bladder, and I don't think those are really even necessary.

  • Here's a tip...
    Most people drop a shortcut to WinMerge into their 'SendTo' folder. That way, they can select two files, or two directories, and then Right Click and say SendTo - WinMerge.

    BUT that will default to NOT being a recursive directory comparison.

    So the tip is to go to your SendTo folder, right click the WinMerge shortcut icon, open its 'properties', and change the target to include ' /r ' at the end.

    Then it will always do the recursive directory comparisons by default.

  • Hello everybody, my name is Damion, and I'm glad to join your conmunity,
    and wish to assit as far as possible.

  • Great tip! I love using WinMerge myself. Glad to have WinMerge integrated in Vault with your help. Thanks Jon.

Comments have been disabled for this content.