Scott Hanselman

Using a Windows version of GNU Patch.exe with CVS and Diff Files

June 18, '05 Comments [4] Posted in DasBlog
Sponsored By

All this is likely old hat for *nix folks, but some Windows people might care.

As you know I work on DasBlog and SourceForge uses CVS for Source Control.

If you want to get the LATEST source for DasBlog and compile it yourself on Windows:

  • Download TortoiseCVS and install it.
  • Make a folder for DasBlog (C:\dev\dasblog) and right click on the folder and select "CVS Checkout"
  • In the CVSROOT text box, enter in this:
    :pserver:anonymous@cvs.sourceforge.net:/cvsroot/dasblogce
    and in the Module text box enter "source"
  • Hit OK. You'll get all of DasBlog.
  • There's a file called CreateDasBlogVdir.vbs that will setup DasBlog in IIS, etc. Then compiled and play.
  • NOTE: When you do this you are implicitly getting a label in source control called "HEAD." That's the latest stuff that Omar and I and the devs (and now you) run. If you don't want the latest unreleased stuff, go to the Revision Tab before you hit OK and select "Choose branch or tag" and enter in "dasblog-1-7-5016-2" to get the last released version.

If you aren't a dev with check in privileges, but you want contribute a patched file:

  • Make your changes to you files locally. Note that with CVS you don't have to "reserve" a file for check out. Just make the change. The file's overlay indicator will change to tell you it's been edited.
    Cvsmakepatch
  • Save the .patch file using the format <modifedfile>.patch and mail it to Omar or I. For example, if you're patching LoginBox.ascx.cs the patch should be LoginBox.ascx.cs.patch.

If you're me, and you want to apply a patch file: (or if you're not me and you just want to apply a standard DIFF/PATCH file on Windows without pulling your hair out)

  • Use Notepad2. Why? Because it's one better than Notepad.
  • Open the patch file in Notepad2 and revel in the fact that Notepad2 already has the syntax highlighting setup to help you visualize the patch differences.
    Patchinnotepad2
  • Download the GNU version of Patch.exe for Windows and put it in your path (or in your C:\Utils, if you're me)
  • Now, make a Patch.bat file that looks like this below:
    @echo off
    patch < %1
    pause
  • Now, right click on the <modifiedfile>.patch file and click "Open With" and associate it with your new patch.bat (not the patch.exe)
    Patchassociation
  • Now copy the <modifiedfile>.patch to the same folder as the original. Double click on the <modifiedfile>.patch and you'll get:
    Goodpatch

Now you can use CVS on Windows and play with CVS patches/diffs, making and patching with ease and grace. Enjoy.

FYI, If you want to get deeper into DasBlog development and start including patches, you'll want to subscribe to the checkin mail for DasBlog's CVS so you'll know what's changing when.

Now playing: Akon - Trouble Nobody

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

New Coding4Fun Article - Where the Heck am I?

June 18, '05 Comments [5] Posted in Learning .NET | Coding4Fun
Sponsored By

S_image-pop_lapGPS-2In this third installment of the "Some Assembly Required" column, I connect to the GPS that came with Microsoft Streets and Trips 2005. I upgraded EdJez's .NET 1.1 application to .NET 2.0 and explores the process and 2.0 benefits and learned more than I wanted about the NMEA GPS data specification. I cover System.IO.Ports, generics collection classes, and revel in the WinForms 2.0 designer. Enjoy!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

DasBlog Gripes?

June 17, '05 Comments [10] Posted in DasBlog
Sponsored By

DasBlog. Yep, it's Open Source. It's free. You can change it. You can leave it as it. Sometimes it sucks, other times less so. This fellow isn't digging dasBlog very much. UPDATED: He has since published a followup/retraction.

Here's some hyperbole and gripes from his post:

  • I'm getting increasingly frustrated with this POS blogging software called dasBlog.
  • I wish before I made the conversion I knew that those features are more like vapor ware.  They don't work.
  • The application restarts every five minutes, and there are so many little idiosyncrasies that I can't control. (He includes this event log here)
  • To this day I can't find anyone that's not using the default themes or a slightly modified one.

Here's some interesting information for anyone who cares:

  • If nobody visits your website in 20 minutes, IIS6 will restart your web application. By default. You can change this setting in IIS. If you have any app, even a custom one, it will be restarted every 20 minutes of inactivity if you don't change the setting. DasBlog simply logs that we restarted.
  • There's actually pretty good documentation on making themes, there's many folks who've changed their themes. There are only 3 template files to edit. You can also use any Radio theme and there's dozens of macros to use.

All this bile after only 2 weeks with dasBlog? That's a bummer. On the upside, he includes this post showing how easy it was to move posts into dasBlog using our Object Model.

I'm sorry you hate dasBlog. I use it, and a few thousand others. I served 780,000 page views on this blog last month with dasBlog. Some users are happy, some are not. Those who are not happy with it can join up and help make it better (remembering that it's free and it's something we do in our free time) or you can switch. Such is the nature of choice.

As aways, if you have a question, ask.

I choose dasBlog for now. I hope readers will make an educated decision and pick a blog that makes them happy.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

PowerPoint - Can you see me now?

June 14, '05 Comments [9] Posted in Musings
Sponsored By

This made me chuckle. This is from a slide deck presented at an internal brown-bag.

Readableversion

It's actually a very clean schema, but I'm thinking the slide doesn't add much. Either way, the tag line almost made Diet Pepsi come out of my nose.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

MaxiVista Version 2 - Still the Shiznit

June 14, '05 Comments [4] Posted in Reviews | Tools
Sponsored By

I've been a big fan of MaxiVista for a long time. I love multi-monitor productivity and now that I have a TabletPC, I consider MaxiVista to be a required tool.

Now Version 2 is out, and it includes a nubmer of new features, with the shiniest of them being it's a KVM out of the box! With a hot key you can switch from your virtual monitor to the underlying machine. Automatically moves the clipboard contents, too.

The other thing that's pretty cool (and a little creepy) is the support for Video Playback. I'm not sure how they are doing it, but I can drag Windows Media Player to the TabletPC (over WiFI) and they virtualize the hardware surface such that the video just keeps playing.

I haven't tried the other new feature, but I'm hoping to soon. You can support up to three additonal monitors. I may just take over my wife's machine when she's not around, to expand my working desktop to a full FOUR monitors.

Check out the demo and put that extra machine and monitor to some use.

Now playing: Miri Ben-Ari featuring Scarface & Anthony Hamilton - Sunshine to the Rain

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

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