MahTweets has moved to Codeplex!
At the start of the year, Codeplex announced support for Mercurial (Hg), possibly the best tooled DVCS for Windows. We’ve now come full circle – originally MahTweets code was on Codeplex via TFS/SVNBridge, but after one too many stuff ups with SVNBridge refusing to let one or more of the team commit, we switched to self hosted SVN.
MahTweets has now returned to Codeplex ’cause DVCS is cool.
From a tooling point of view, all we had to do for Fisheye was upgrade 2.3 to get support for Hg. Changing TeamCity over was pretty easy too, like Fisheye we just had to point it to the Hg binary location and it was good to go. JIRA hooks into Fisheye, so it doesn’t need explicit Hg support. From a dev client point of view, we’ve changed from TortoiseSVN to TortoiseHg, and VisualSVN to VisualHg.
However, the solution, project and MSBuild file that the build server uses more complex. All of our automagic builds append the revision number from the source control. We were achieving this by using the MSBuild Community Tasks which includes tasks for Subversion in all our CSProjs’ (so every assembly has the correct version) and in our msbuild file.
<SvnVersion LocalPath="$(ProjectDir)" ToolPath="$(MSBuildCommunityTasksPath)\Subversion\"> <Output TaskParameter="Revision" PropertyName="Revision" /> </SvnVersion>
The obvious issue with this is that no projects could build because SvnVersion had a bit of a panic attack being unable to find any Subversion bindings. While there is no Mercurial support in the MSBuild Community Tasks, there is (thankfully) a separate library available – MSBuild Mercurial Tasks.
<HgVersion LocalPath="$(ProjectDir)" > <Output TaskParameter="Revision" PropertyName="Revision" /> </HgVersion>
Very similar syntax, with the only difference being no ToolPath. The SvnVersion task uses ToolPath to point to your svn.exe, whereas HgVersion just uses the “hg” command so a command line client must be installed/registered properly with Windows (TortoiseHg installs this, or they maintain a command line client without the GUI)
