Thursday, January 28, 2010 – 9:30 pm
My last couple of posts have been about Mercurial. I keep discovering new things I like about it. Combining it with PowerShell also presents some exciting possibilities.
I have a couple of PowerShell scripts I’ve used for building stuff for a while. This one for instance.
$lastBuild = join-path $env:temp lastbuild.log
function b {
msbuild /l:"FileLogger,Microsoft.Build.Engine;logfile=$lastBuild" $args
}
function lb { notepad $lastBuild }
The advantage of this is that you can use the lb command to load the last build log into your favorite editor and browse or search it. The example above uses notepad but notepad2 is a better choice, especially if your log files are large. This beats scrolling up and down in the shell window looking for the root cause of build breaks etc.
So where does Mercurial come in? Turns out Mercurial’s repository cloning feature(s) mean you can create a “buddy build” to quickly test local commits before pushing them to the authoritative repository.
Read the rest of this entry »
Tags: Continuous integration, Mercurial, PowerShell
No Comments »