缺省方式下,Subversion Edge禁用了hook模版的修改功能,这篇文章介绍Subverison Edge中启用方式。
使用Subversion Edge提供功能对某仓库的hook模版进行编辑时,可能会显示如下信息:
The hook editor is disabled by default. Someone with access to the filesystem can enable this feature in security.properties with hook.script.editor.enabled=true Then restart the application.原因
愿意上述提示中已经说的很清楚了,缺省情况下hook的editor是被禁用的,所以无法直接进行编辑。
对应方式Subversion Edge环境准备和仓库创建的操作可参看如下文章:
- https://liumiaocn.blog.csdn.net/article/details/108212511
首先确认security.properties文件以及设定的内容
[root@liumiaocn conf]# pwd /opt/subversion/csvn/data/conf [root@liumiaocn conf]# ls security.properties security.properties [root@liumiaocn conf]# grep hook.script.editor.enabled security.properties hook.script.editor.enabled=false [root@liumiaocn conf]#
可以看到确实设定为false了,进行备份并修改
[root@liumiaocn conf]# cp -p security.properties security.properties.org [root@liumiaocn conf]# vi security.properties [root@liumiaocn conf]# diff security.properties security.properties.org 50c50 < hook.script.editor.enabled=true --- > hook.script.editor.enabled=false [root@liumiaocn conf]#
重启csvn服务
[svn@liumiaocn ~]$ id uid=1002(svn) gid=1002(svn) groups=1002(svn) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [svn@liumiaocn ~]$ sudo service csvn restart Stopping CSVN Console... Stopped CSVN Console. Starting CSVN Console... ... CSVN Console started Waiting for application to initialize (this may take a minute)....................................... CSVN Console is ready at http://localhost:3343/csvn [svn@liumiaocn ~]$
重启之后,再次编辑hook模版就不会出现上述提示了。