You need to commit. In Mercurial, branch are permanent information recorded in the commit itself. After you typed hg branch babar
your "working copy" got changed to branch babar
but there won't be any commit on this branch until you create an actual commit from your working copy with hg commit
. You can use hg summary
at any time to undersrand the state of your repository.
Mercurial has a lighter concept called "bookmark" that allows to reference changesets without permanente records in the commit itself. You should check it out before going commiting yourself into using named branch.