DIFF on Windows

Ever have to use the DIFF utility in Windows? I just had to and boy-oh-boy was it lame.

I guess when a shell program is called in a Windows environment, it only stays open until its execution terminates. This is a little frustrating when using CVS and calling a CVS DIFF. The window just flashes and goes away.

I came up with a quick hack that seems to work. The window is told to stay open using the pause command in a batch file.

@echo off "\Program Files\GnuWin32\bin\diff.exe" %1 %2 pause

If you are using TortoiseCVS (or SVN), just set the preference to point to your batch file instead of diff.exe.

Someone please let me know if there is a better way to do this.

Update: GVim Users, there is a better way. A simple look at the command-line options reveals that the -d option starts GVim in diff mode. You just simply need to prefix the “Two-way diff parameters” in your Turtoise preferences with -d.

This entry was posted on Friday, August 10th, 2007 at 9:30 am and is filed under Lifehacks. Both comments and pings are currently closed.

Comments are closed. Sorry.

Site Stuff

Pages

Projects

Archives

Categories