Is th开发者_Go百科ere a way to prevent users from committing without using --force
when a branch is closed?
It should be easy to write a hook to do it: write a pre-commit hook that checks if the current parent is closed (by inspecting the "extra" changeset metadata field).
For documentation, start here: http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html. You may also want to look at the output of hg help hooks.
精彩评论