我想使用 ACL 拒绝访问除 Mercurial 中的一名工程师之外的特定分支
我想做的是允许所有开发人员创建自己的功能分支、合并它们等,但特殊分支“Release”应该只能由一个工程师(或一组)写入。我尝试的是:
[acl.allow.branches]
release = @release-manager
[acl.deny.branches]
release = *
我还希望发布经理成为唯一可以在存储库中添加标签的人。怎么做呢?
What I want to do is to allow all developers to create their own feature branches, merge them, etc. but a special branch "Release" should be writable only by one single engineer (or a group). What I tried is:
[acl.allow.branches]
release = @release-manager
[acl.deny.branches]
release = *
I also want the release manager to be the only one who can add tags in the repo. How to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现使用 MercurialACL 的当前实现无法实现我想要的功能,我决定破解它并支持更改工作方式以使我的用例工作。另外,我的 fork 允许您在分支名称中使用通配符,例如:
这适用于以 release- 开头的任何分支,例如“release-1.0”
您可以在此处找到代码 https://bitbucket.org/cloud9ers/mercurialacl/
I found out that what I wanted is un-doable using the current implementation of MercurialACL, I decided to hack it and support change the way is work to let my usecase work. Also my fork allows you to use globing in branch names like:
this will work for any branch the starts with release-, like "release-1.0"
You can find the code here https://bitbucket.org/cloud9ers/mercurialacl/