I’ve used Subversion and TortoiseSVN for quite a while, and even have the free Standard Edition of VisualSVN Server set up on my Windows Home Server, but I wanted to see what Mercurial was like. Having tried TortoiseHg and thoroughly enjoyed using it, I decided to make the complete switch. There are several blogs that have covered some of the parts of setting up Mercurial and hgwebdir, notably by eWorld.UI by Matt Hawley, DJMatty and Vampire Basic. My impression, however, is that these were written by folks who assumed a fair amount of pre-existing knowledge about Python and/or had a different configuration in mind. I really have no Python experience, so it was a bit more of a struggle to get all the right pieces in place. Further, I particularly wanted to be able to use Windows Home Server to securely host my repositories for both home and remote use under an “hg” virtual directory. This particular configuration didn’t seem to be covered in any one definitive source. What follows is ... [More]
For general scripting/automating on Windows, I generally prefer PowerShell.  There are times, however, when “batch scripting” with CMD.EXE is needed.  If you’ve ever tried writing scripts of any complexity, you know that “batch scripts” can be a real pain to deal with.  In particular, expansion of variables happens by default when a command is read, which is not what many other scripting languages do.  Raymond Chen has a nice post describing this in further detail. For this reason, it can be useful to turn on delayed expansion if you’re doing anything even remotely interesting.  One of the unexpected downsides — or bugs, in fact — of delayed variable expansion is that the ‘!’ character seems to eaten… so if you have a command you’re calling that uses a ‘!’ in its syntax, you’re plain out of luck.  The good news is that you can use the delayed-expansion behavior to... [More]
Update (18-Jan-2011): I uploaded the source for both PathUnwriter.cs and OutgoingStreamFilter.cs in case any one wants it. As mentioned previously, I wrote an HttpModule to “undo” the path rewriting that GoDaddy seems to do on behalf of a hosted domain.  For reference here is the code that does it (PathUnwriter.cs): using System; using System.Configuration; using System.Collections.Generic; using System.Web; using System.IO; using System.Text; namespace Spudnoggin.HostingUtils { /// <summary> /// Clean outgoing path for ISPs that insist on clobbering the incoming path. /// </summary> /// <remarks> /// This module may need to be added *last* so that it's one of the outer-most /// filters... the filters are created inside-out... /// </remarks> public sealed class PathUnwriter : IHttpModule { void IHttpModule.Dispose() { //clean-up code here. } ... [More]