Mercurial: How to create/remove/merge branches

# create new branch
hg branch featureX
hg commit -u username -m 'start new branch for featureX'

# merge
hg update -C default
hg merge featureX # it'll merge featureX into default

# remove branch
hg up -C featureX
hg commit --close-branch -m 'close branch featureX' -u username
hg up -C default