This answer has become outdated: you can now add a @
bookmark and Mercurial 2.4 and later will automatically check it out for a new clone. Your users will have to be careful about keeping the @
bookmark pointed at the branch head they want, though.
You cannot make another branch the default
branch, by which I mean you cannot tell Mercurial that you would like branch-X
to be checked out in a new clone. You should always make default
the branch the branch that users want to checkout. This is described in the wiki.
People sometimes try to delete the default
branch. This can be done by not creating one in the first place:
$ hg init repo
$ cd repo
$ hg branch dev
$ hg commit -m "Ha, no default branch!"
When there is no default
branch present, hg clone
will checkout the tip-most changeset. This is a bad idea since this changeset changes every time something is pushed to the repository. So if you have a dev
and prod
branch in the repo, then a new clone will checkout a "random" changeset depending on where the last commit was made. That is even more confusing that teaching people that default
means "the normal branch where you should work by default".