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

1.1k views Asked by At

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.

We are using Atlassian OnDemand with the integrated Crucible SVN directory.

Am I right in thinking that I just need to establish the location of the 'hooks' directory within our SVN repository? Can anybody advise me on how to do this?

Help greatly appreciated, SVN rookie.

2

There are 2 answers

0
Mand Beckett On

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). It is in this folder you will find another folder called 'hooks'.

Regards

Mand

Online Operations, WANdisco

0
Manuel_B On

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. (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:

Custom Hooks: NO A pre-commit hook is available that requires a JIRA issue key. Custom hooks are not available at the moment due to reasons listed here (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). However, the pre-revprop-change hook (which is used to edit commit message only) can be enabled upon request. See JST-2779 (https://studio.atlassian.com/browse/JST-2779).

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