Pulled Apart - Part II: What? You're not using TFS!

Note: This is part of a series, you can find the rest of the parts in the series index.

[Pull Icon]

Some people see learning as a side effect of software development, while others believe that all must be known upfront—so no learning occurs. The reality is that learning during software development is a core part, and you should embrace it. One of the things I’ve done with Pull is to host the code with CodePlex. CodePlex offers two ways to store source code—you can use TFS/SVN or you can use Mercurial.

In the past, I have always used TFS because I’m comfortable with it—it’s a tool I know well and like to use. However, to embrace learning for Pull, I decided it could be a Mercurial project. That brought me to my first issue: I didn’t have any Mercurial tools, so I went off to find a set I liked.

Since I didn’t want to install anything—my machine is so lightweight and fast—many of the packages out there were not an option (TortoiseHG, I’m looking at you). In the end, I chose the Mercurial Cmd Portable from PortableApps.com, which gave me a lightweight option but meant no GUI—which, honestly, isn’t a bad thing.

Comparing it to TFS is a two-part comparison:

  1. If I compare it to the full GUI TFS inside Visual Studio, I prefer the Mercurial experience—working disconnected from the server and coming online is easier.
  2. There are TFS Power Tools, which provide a command-prompt tool called tfpt.exe; it has an online option that makes the whole experience just as good as what Mercurial offers.

One of the biggest differences between how TFS and Mercurial work is branching/merging/labels/forks, etc.—which I haven’t experienced yet.

Some of the things I did in my Mercurial setup that may help others:

.hgignore

My ignore file for C# projects done in Visual Studio, with CodeRush installed.

syntax: glob

*.csproj.user
*/[Oo]bj/*
*/[Bb]in/*
*.suo
*DXCore.Solution
hgignore[.-]*
[Tt]humbs.db
*.user
*.bak.*
*.bak
*.[Cc]ache
*/[Pp]ublish/*
*.vssscc
*.vs10x

hgrc

My config was fairly straightforward: I set up auth so that my CodePlex details are remembered and created an alias called codeplex. This lets me just type hg codeplex, and it prompts for my password—and that’s it: one line gets the repo pushed to CodePlex. I also set up WinMerge as the diff tool, because I’m a WinMerge fan, and this just lets me keep using it easily.

[auth]
codeplex.prefix=hg01.codeplex.com/pull
codeplex.username=rmaclean
codeplex.schemes=https

[alias]
codeplex=push https://hg01.codeplex.com/pull

[ui]
username=Robert MacLean <robert@sadev.co.za>

[extensions]
; must uncomment this line
extdiff=

[extdiff]
cmd.winmerge=E:\PortableApps\WinMergePortable\App\WinMerge\WinMergeU.exe
opts.winmerge=/r /e /x /u /wl