开发者

Preventing users from committing when the branch is close

开发者 https://www.devze.com 2023-04-04 15:26 出处:网络
Is th开发者_Go百科ere a way to prevent users from committing without using --force when a branch is closed?

Is th开发者_Go百科ere a way to prevent users from committing without using --force when a branch is closed?

Another way is to ask if I am sure I want to commit and act accordingly.

Is there such a way to do it using a hook/extension?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号