.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
5.17.2007

 
Merging Code
Another from the "not necessarily related to .NET proper" category ...

I'm doing quite a bit of manual merging of source code files lately, and am trying to come up with the best process and toolset to do so. In order of age, there's WinDiff (ancient Win32 days), then the SourceSafe diff tool, and TFS. There are a ton more, but those are what are in my current arsenal.

I know that TFS is extensible in terms of the diff and merge tools, allowing you to point it at whatever tool you want. Turns out, their default tool is a standalone tool: DIFFMERGE.EXE Since we're not using TFS for these source files I'm merging, I played with using that as a stand-alone tool. The highlights:
  • You have to provide file path information on the command-line, which is a bit painful
  • Can't compare directories - it's one file at a time
  • Merge results are immediately saved in the 3rd pane to a given file (pretty cool)
Knowing that TFS allows this extensibility to plugin other tools, I searched for the diffmerge tool. Found this post from James Manning about the various tools that are out there.

WinMerge - merge can disregard whitespace, can't automatically edit the resulting file. Looks like you have to copy/paste into the 3rd window.

KDiff3 - UI looks very non-Windows-ish, but feature set rocks. Commands to take content from file1 or 2 and shove it in the right spot in the merge results file. Save the merge results at the end.

So as of now - the winner is KDiff3. I'll be using it for my next merge operation.


Comments: Post a Comment

Powered by Blogger