With mercurial it is easy to create a tag at a certain revision: hg tag -r <revision> <tag-name>
. But how to create a branch at a certain revision?
Preface: Mercurial branches are two types:
In order to get named branch BRANCHNAME, starting at REV
hg update REV
hg branch BRANCHNAME
...
hg commit
commit is a must, because
the branch will not exist in the repository until the next commit
as noted in hg help branch
hg update REV
...
hg commit
and current branch get additional head
hg push --new-branch