branch: added more support for named branches
hg branch now has a -C (--clean) option, to reset the current (dirstate)
branch to the branch of the last commit (first parent).
c0bd7d8b69ef uses err() instead of warn() but prototype doesn't match
we might want to make warn() look more like err() in the future
to avoid this kind of problem.