Idea: hg merge --close

Joerg Sonnenberger joerg at bec.de
Sun Apr 7 06:52:45 EDT 2019


Hello all,
one thing we discussed during the mini sprint is the issue of dealing
with merged vs active vs inactive branches. At the moment, closing a
branch to get it off the branch list is a separate operation, which can
be annoying. One idea for this is to add a --close flag to merge, which
effectively results in the following topology:

     b1a  b2a
     |    |
     |    b2b (close=1)
     |   /
     b1b (merge)

as opposed to the current:
     b1a  b2a
     |   /
     |  /
     b1b

The advantage to having a separate closing commit is that it doesn't
keep a topological head open. The commit message to be used could be
specified as templated option in hgrc, defaulting to something like
'Closing branch %s after merge' to so. The one downside is that the
parent of b1b now points to an artifical commit, which makes the history
a bit more messy.

General comments on the idea?

Joerg


More information about the Mercurial-devel mailing list