Is it possible to reopen a closed branch in Mercurial?

Lóránt Pintér picture Lóránt Pintér · Nov 4, 2010 · Viewed 33.6k times · Source

I understand that it is possible to close a named branch in Mercurial, so that it will not appear in the hg branches list:

hg commit --close-branch -m 'close badbranch, this approach never worked'

Is it possible to later re-open the branch if need be?

Answer

Tim Delaney picture Tim Delaney · Nov 4, 2010

You can just hg update to the closed branch then do another hg commit and it will automatically reopen.

The closed flag is just used to filter out closed branches from hg branches and hg heads unless you use the --closed option - it doesn't prevent you from using the branches.