SVN and WinMerge

Posted in Misc on Sat, May 17, 2008 at 04:33 PM

Today I went looking for a good diff viewer on Windows. Typically if I'm doing heavy diff viewing, I switch over to my Linux box and use KDE's kompare. kompare is an excellent tool, and you can pipe the output of Subversion straight into it to get a nice graphical view:

$ svn diff | kompare -o -

However, sometimes I really wish I had more than just viewing svn's diff output manually on Windows, hence the search for a good Windows diff viewer. I found a nice, open-source one called WinMerge. I had quite a bit of trouble integrating it with svn on the command line though, because WinMerge doesn't seem to accept diff output from stdin.

After a bit of digging I found this tidbit by a guy named Joshua Flanagan. Although it involves creating a Windows batch file (blech), it seems to do the trick and I have a nice diff viewer now. We'll see how I like it, and I'll keep everyone posted.

6 comments:

Dave Johansen says:

You should check out TortoiseSVN ( http://tortoisesvn.tigris.org/ ). It integrates with the Windows Shell and automatically makes use of WinMerge. I usually like the manual control that you get with the command line, but the ease and visibility of TortoiseSVN is REALLY sweet.

Posted on Sat, May 17, 2008 at 05:56 PM
Irwin1138 says:

Hm, personally I almost never used diff viewer, maybe since Im not branching that much.

Posted on Sat, May 17, 2008 at 10:09 PM
Brad says:

Yeah I know about TortoiseSVN, but never tried it. Might have to give it a try one of these days.

Viewing diffs isn't useful just for branching--it's also useful just to review your changes you've made before you commit.

Posted on Sat, May 17, 2008 at 10:37 PM
Dave Johansen says:

Ya, maybe I'm just overly anal or something but I almost always do a diff on all of the changed files before commiting (especially with a big change).

Posted on Sat, May 17, 2008 at 11:20 PM
Brad says:

Me too. It helps me make sure I've thought through my changes before I decide I really want to track them.

Posted on Sun, May 18, 2008 at 12:19 AM
Irwin1138 says:

Sounds like its a useful habit 8)

Posted on Sun, May 18, 2008 at 05:36 AM

Post a Comment



HTML not allowed; instead, use Markdown.