I have tried the
hg log --rev "branch([changeset])"
but what I got is a collection of all the changesets in this branch.
What I do want to get is the name of the target branch (e.g. default) instead of the whole collection.
Is there a way to achieve this goal?
That's... not what revsets are for. You want to do something rather different:
See
hg help templates
.