简体   繁体   English

Kallithea不使用.hg / hgrc中定义的钩子

[英]Kallithea does not use hooks defined in .hg/hgrc

I want to allow pushing to the default branch only for certain users. 我只允许某些用户推送到默认分支。 Since Kallithea does not have this functionality built in my attempt was creating a hook that should provide that behavior. 由于Kallithea没有内置此功能,因此我尝试创建一个应提供该行为的钩子。 I know that Kallithea has a GUI for this but I wanted to use built in mercurial functionality and hgrc file in the repository. 我知道Kallithea对此有一个GUI,但是我想在存储库中使用内置的功能和hgrc文件。

I have a hook defined in .hg/hgrc file in a repository that is served through Kallithea SCM 我在通过Kallithea SCM提供服务的存储库中的.hg / hgrc文件中定义了一个挂钩

[extensions]
acl = 

[hooks]
pretxnchangegroup.acl = python:hgext.acl.hook

[acl]
sources = push 

[acl.allow.branches]
default = myuser

This setting should allow push rights to default branch ONLY for 'myuser' but that is not happening. 此设置应仅允许对“ myuser”的默认分支的推送权限,但不会发生。 I'm not sure if the hook is not set up correctly or is Kallithea just skipping hooks defined in .hg/hgrc 我不确定挂钩是否设置正确,还是Kallithea只是跳过.hg / hgrc中定义的挂钩

It's not clear how are you expecting this to work. 目前尚不清楚您期望它如何工作。 I don't know much about acl extension, but I doubt it knows anything about Kallithea and its users, so I don't think it's going to work like this. 我对acl扩展了解不多,但是我怀疑它对Kallithea及其用户一无所知,因此我认为它不会像这样工作。 I'd rather write a custom Python hook calling out to Kallithea to authorise users. 我宁愿编写一个自定义的Python钩子,调用Kallithea来授权用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM