简体   繁体   English

向Atlassian OnDemand / Crucible添加SVN提交后钩子

[英]Adding a SVN post-commit hook to Atlassian OnDemand/Crucible

I want to add a post-commit hook script that sends out an email - I am following this as a guide http://www.petefreitag.com/item/244.cfm . 我想添加一个发出电子邮件的提交后挂接脚本-我将其作为指南http://www.petefreitag.com/item/244.cfm

We are using Atlassian OnDemand with the integrated Crucible SVN directory. 我们将Atlassian OnDemand与集成的Crucible SVN目录一起使用。

Am I right in thinking that I just need to establish the location of the 'hooks' directory within our SVN repository? 我是否认为我只需要在SVN存储库中建立“ hooks”目录的位置,对吗? Can anybody advise me on how to do this? 有人可以建议我这样做吗?

Help greatly appreciated, SVN rookie. 帮助极大的赞赏,SVN新秀。

you are kind of right. 你是对的。 The problem is that you do not have to find the hooks folder in the repository, you have to find the hooks folder in the file system where the repository was created. 问题在于您不必在存储库中找到hooks文件夹,而必须在创建存储库的文件系统中找到hooks文件夹。 ( http://svnbook.red-bean.com/en/1.7/svn.reposadmin.create.html ) http://svnbook.red-bean.com/en/1.7/svn.reposadmin.create.html

Unfortunatly you do not have access to the file system which means you won't be able to install these hooks. 不幸的是,您无权访问文件系统,这意味着您将无法安装这些挂钩。

Here is the official statement from Atlassian about this topic: 这是Atlassian关于此主题的官方声明:

Custom Hooks: NO A pre-commit hook is available that requires a JIRA issue key. 自定义挂钩:否需要提交JIRA发行密钥的预提交挂钩。 Custom hooks are not available at the moment due to reasons listed here ( https://studio.atlassian.com/browse/JST-1444 ). 由于此处列出的原因,目前无法使用自定义钩子( https://studio.atlassian.com/browse/JST-1444 )。 If you have suggestions on hooks you'd like to see in the future, please request the feature here ( https://studio.atlassian.com/secure/CreateIssue.jspa?pid=10073&issuetype=4 ). 如果您对以后希望看到的挂钩有建议,请在此处请求功能( https://studio.atlassian.com/secure/CreateIssue.jspa?pid=10073&issuetype=4 )。 However, the pre-revprop-change hook (which is used to edit commit message only) can be enabled upon request. 但是,可以根据要求启用pre-revprop-change挂钩(仅用于编辑提交消息)。 See JST-2779 ( https://studio.atlassian.com/browse/JST-2779 ). 参见JST-2779( https://studio.atlassian.com/browse/JST-2779 )。

Source: https://confluence.atlassian.com/display/AOD/Restricted+Functions+in+Atlassian+OnDemand 资料来源: https : //confluence.atlassian.com/display/AOD/Restricted+Functions+in+Atlassian+OnDemand

If you run the ' svn info ' command for the path you want to add the hook to, you'll see the location of the root (it will be labelled Repository Root). 如果对要添加挂钩的路径运行“ svn info ”命令,则会看到根的位置(它将被标记为“存储库根”)。 It is in this folder you will find another folder called 'hooks'. 在此文件夹中,您将找到另一个名为“ hooks”的文件夹。

Regards 问候

Mand 曼德

Online Operations, WANdisco WANdisco在线运营

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

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