Using WinMerge with Subversion#
I'm still using the Subversion command line interface (despite Scott's gentle recommendation that maybe I should graduate to the GUI world), but I've grown out of WinDiff and moved on to WinMerge as my visual diff tool of choice. The process for integrating the tools is the same that I outlined for using WinDiff, except the contents of the batch file should be changed to:

start "WinMerge" /B /WAIT "C:\Program Files\WinMerge\WinMergeU.exe" /e /ub /dl %3 /dr %5 %6 %7

A couple immediate advantages is that you now get descriptive labels for the 2 different file windows (working copy, revision), and you can quickly exit out of a diff by pressing ESC, making it easy to cycle through a folder of modified files.
Wednesday, April 26, 2006 11:56:00 PM (Central Daylight Time, UTC-05:00) #    Comments [1]  | 

 

Using WinDiff with SubVersion#

This is a tip for anyone using the SubVersion command-line client (svn.exe) that can't mentally process unix-style diff output.

By default, running the svn diff command on a modified file in your working directly will dump diff output to the console:

C:\work\ProfileView>svn diff
Index: ControlBuilder.cs
===================================================================
--- ControlBuilder.cs   (revision 25)
+++ ControlBuilder.cs   (working copy)
@@ -59,10 +59,11 @@
             if (validationType != ValidationDataType.String)
             {
                 validator = new CompareValidator();
-                validator.ID = "val_" + property.Name;
+                validator.ID = "v" + property.Name;
                 validator.Operator = ValidationCompareOperator.DataTypeCheck;
                 validator.Type = validationType;
                 validator.ValidationGroup = DEFAULT_VALIDATION_GROUP;
+                validator.SkinID = "validators";
                 validator.ErrorMessage = DEFAULT_VALIDATION_ERROR_MESSAGE;
                 validator.Display = ValidatorDisplay.Dynamic;
             }

In this simple example, you can probably figure out what changed. But if the modifications were more extensive, the output would be harder to interpret.

Enter WinDiff. WinDiff is a graphical utility for visually comparing 2 files or the contents of 2 folders. There are many other similar tools available - I choose WinDiff because its free, and its already on my system. It comes with Visual Studio .NET (if you install the VC++ Tools); or if you don't own VS.NET, you can get it with the Windows Support Tools.

The SubVersion client allows you to specify a 3rd party diff tool using the diff-cmd argument. However, the argument list it passes to the tool does not match the input arguments that windiff.exe is expecting. The solution is to create an intermediate batch file that translates the arguments. I created svnwindiff.bat in my SubVersion install folder (c:\apps\subversion). It contains a single command:
"C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin\windiff.exe" %6 %7

I then specify this batch file as my external diff tool:
C:\work\ProfileView>svn diff --diff-cmd c:\apps\subversion\svnwindiff.bat

Which will open the following window: Changes viewed in WinDiff

Finally, to save yourself some typing, you can set WinDiff as your default diff tool by editing your SubVersion config file located at:
C:\Documents and Settings\username\Application Data\Subversion\config

Find the commented (#) line for diff-cmd, uncomment it and set the path, so it looks something like this:
diff-cmd = c:\apps\subversion\svnwindiff.bat

Now, simply typing svn diff at a command-line will automatically launch WinDiff to visually display the differences.

Update: I've been taken to task for mentioning an ancient diff tool like WinDiff. While I stand by my initial reason for WinDiff ("its already on my system"), I figure it's in your best interest that I mention some more modern alternatives. A few free ones: KDiff3, WinMerge, and ExamDiff. Scott seems to like the $30 Beyond Compare (although it is conspicuosly missing from his Ultimate Tools List).

Saturday, January 14, 2006 3:25:43 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Games of my youth#

My dad is selling the family house, so I just received a bunch of boxes with a bunch of old stuff I hadn't seen in years. One box contained all my old Commodore 64 5.25" disks (unfortunately, the C64 was nowhere to be found). Looking at these disks brought back a lot of memories of a LOT of hours spent playing them.

  • SuperStar Ice Hockey (way ahead of its time, included multi-season franchise mode, with player trades, drafts, training, etc)
  • M.U.L.E.
  • QuantumLink - recently revived, kinda
  • GEOS - made my C64 as slick as my friend's new Macintosh - except that mine had color!
  • Zork III - these used to be available free online, but I think Activision has pulled them, with an eye towards making some bucks off nostalgic geeks.
  • Bard's Tale III - one of the great RPGs, before RPG was watered down to mean "a game that allows you to level-up your character". Not to be confused with the recent PS2/XBOX game that soiled a once good name.
  • Wasteland - the coolest RPG of the day (yeah, Bard's Tale gets points for being first, but Wasteland had style). It was later "unofficially" revived as Fallout 2, which did an admirable job or recreating the fun of the original series.
  • Dragon Wars - an unofficial successor to the Bard's Tale series - it never held my attention the way BT3 and Wasteland did.

Now I need to get one of those parallel cables to hook up a 1541 drive and copy these disk images to VICE.

Saturday, November 19, 2005 8:28:04 PM (Central Standard Time, UTC-06:00) #    Comments [2]  | 

 

Microsoft playing fair, while Google tries to lock in?#

I know its hip to bash on the cool, successful company, so I'm trying my hardest not to let this post come off that way. I was surprised by this behavior, and will try to present the facts.

I'm using Internet Explorer 7 Beta. It includes a search box next to the address bar (just like firefox). It defaults to MSN Search, but surprisingly, it also includes a drop down that lets you change to AOL, Yahoo, Google, or Ask Jeeves. I selected Google once, it worked as expected, but the next time I launched IE, it was set back to MSN Search. Without digging much further, I figured that was just how it had to be... Microsoft was giving space to the others, but still asserting its control.

Today when I browsed to the Google homepage, I got a little DHTML pop-up window that said something to the effect of "hey, you're using IE7, wanna change the default for your searchbox to use Google?" Perfect, I had wanted to do that, and I guess they figured out how. So I press OK.  I restarted IE7, and sure enough, my default search was now Google. Thanks Google.

Except, a funny thing happened when I let Google change my settings. That list of alternate search engines that Microsoft had provided, for the user's benefit, was now replaced by a single choice: Google. Yes, I wanted Google as my default, but I never said I wanted Google as the only choice! That's annoying.

That is when I noticed the Search Settings... menu option at the bottom of the search bar's menu. It includes a Restore Defaults... button, which does exactly that.  I clicked it, and all of my search engines were back (and MSN Search was back to being the default). From that Search Settings screen, I selected Google, and clicked Set Default. Now Google was my default search engine, AND I still had the choice of selecting a different engine from the drop down. That is what I wanted. Why didn't Google give me what I wanted?

Sunday, November 13, 2005 12:34:49 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

All content © 2010, josh
About this site
Send mail to the author(s) Contact me
Feed your aggregator (RSS 2.0)
Joshua Flanagan
I am a software developer focused on continuous improvement in the .NET community
Los Techies

On this page
Archives
Rest of the world

Acknowledgements

Powered by: newtelligence dasBlog 2.1.8209.14743

Special thanks to LosTechies.com

Site theme based on the essence design by Jelle Druyts

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.