Like Amber said, when you close a branch, it just records that it is closed. As a consequence when you do "hg branches
" you will just see "default
", and not "other-branch
".
However, as soon as you switch to this branch and commit something new, it automatically reopen it (and thus appears again in the list of "hg branches
"). You can also re-close it when you are done.
I find this feature actually desirable: Imagine you have created a "stable" branch in order to stabilize some code for a delivery, only allowing bug fixes on this branch. Now after the delivery, you can close the stable branch and develop new features again on default, switching to the next iteration and preparing the next delivery (assuming you are using scrum for instance). Now when three days after, your delivery customer finds a problem and demand to receive a fixed delivery, not wanting to wait for the next one, then you can easily switch to the stable branch, reproduce the problem, fix it (reopening the branch), redeploy, and finally close the branch again. This seems like a plausible scenario and a good Mercurial behavior to me.
Just my 0.02€ :-)
Cheers,
Christophe.
= The illiterate of the 21st century will not be those who cannot read or write; they will be those who cannot learn, unlearn, and relearn. --Alvin Toffler =