Kallithea不使用.hg/hgrc中定义的钩子 [英] Kallithea does not use hooks defined in .hg/hgrc

查看:98
本文介绍了Kallithea不使用.hg/hgrc中定义的钩子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只允许某些用户推送到默认分支.由于Kallithea没有内置此功能,因此我尝试创建一个应提供该行为的钩子.我知道Kallithea对此有一个GUI,但是我想在存储库中使用内置的Mercury功能和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. 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 SCM服务的存储库中的.hg/hgrc文件中定义了一个钩子

I have a hook defined in .hg/hgrc file in a repository that is served through Kallithea SCM

[extensions]
acl = 

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

[acl]
sources = push 

[acl.allow.branches]
default = myuser

此设置应仅允许对"myuser"的默认分支的推送权限,但不会发生.我不确定挂钩是否设置正确,还是Kallithea只是跳过.hg/hgrc

This setting should allow push rights to default branch ONLY for 'myuser' but that is not happening. I'm not sure if the hook is not set up correctly or is Kallithea just skipping hooks defined in .hg/hgrc

推荐答案

目前尚不清楚您希望它如何工作.我对acl扩展了解不多,但是我怀疑它对Kallithea及其用户一无所知,因此我认为它不会像这样工作.我宁愿编写一个自定义的Python钩子,调用Kallithea来授权用户.

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. I'd rather write a custom Python hook calling out to Kallithea to authorise users.

这篇关于Kallithea不使用.hg/hgrc中定义的钩子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆