How can I configure a Mercurial server to restrict commits to a named branch once it has been closed? I only want the repository administrator to have the ability to reopen the branch.
https://www.mercurial-scm.org/wiki/PruningDeadBranches says that closed changesets can be identified by "close=1 in the changeset's extra field". It's not clear how to read a changeset's extra field using the Mercurial API.
There is an ACL extension that is distributed along with Mercurial. You should be able to specify the frozen branches by denying commit to every one except the administrator. I am not sure if named branches can leverage this facility.
Configuring acls:
[acl.deny.branches]
frozen-branch = *
[acl.allow.branches]
branch_name = admin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With