The result I would need is that when cloning a repository the code is at the last revision of a branch that is not the default branch, with no need to do “hg update mybranchname”.
Is this possible?
The result I would need is that when cloning a repository the code is
Share
The advice until now has been: you should always use
defaultas your main branch since Mercurial will checkoutdefaultif it finds it in the repository.This changes a little with Mercurial 2.1: you can now close the
defaultbranch (if you have one) and add a bookmark nameddefaultin its place. A new clone will retrieve the bookmark and update to it, effectively switching to another branch in the process.Note that it’s your responsibility to keep the
defaultbookmark pointing to the head of the branch you want to checkout, so this is not 100% fool proof.