Questions tagged [svn-hooks]

In Apache Subversion, a hook is a program triggered by some repository event, such as the creation of a new revision or the modification of an unversioned property. This is often used for integration of Subversion with other tools, e.g. bug tracking software.

Subversion hook is a program triggered by some repository event, such as the creation of a new revision or the modification of an unversioned property. This is often used for integration of Subversion with other tools, e.g. bug tracking software, for implementing custom policies and for e-mail notifications.

Hooks in Subversion are stored as a part of the repository on the Subversion server in a directory called "hooks". E.g. C:\Repositories\foobar\hooks\.

Helpful articles from the SVNBook:

  1. Subversion Repository Hooks (complete reference on each hook type)

  2. Implementing Repository Hooks

215 questions
3
votes
1 answer

SVN Post Commit Hook to Deploy a website

I have been reading for a while and got a few answers, but I just need some more help. I am trying to automatically deploy a website when a certain change set is committed to a branch, so I release my different versions from different branches. For…
Ian Jamieson
  • 4,376
  • 2
  • 35
  • 55
3
votes
2 answers

No module named _core when using mailer.py on Windows/Python 2.7

I'm trying to configure and run SVN post-commit hook sending mails. I've downloaded class mailer.py, installed Python 2.7 and svn-win32 bindings for svn. The machine is Windows-7 64 bit, the Python is 32 bit. Now the mailer.py ends with error, which…
Danubian Sailor
  • 1
  • 38
  • 145
  • 223
3
votes
1 answer

CruiseControl.NET does not execute Subversion hook scripts

On our CC.NET continuous integration server, I have implemented a Start Update hook script that works fine when I check out the source using TortoiseSVN. The hook script is meant to clean the working copy of all unversioned files before each build.…
codewario
  • 19,553
  • 20
  • 90
  • 159
3
votes
2 answers

SVN Pre Commit Hooks

I am currently trying to extend our already existing (and working) pre commit batch file for committing to SVN. The first part blocks any commit that does not have comments and works as expected. The second part is an attmept to block users…
Dean
  • 5,896
  • 12
  • 58
  • 95
3
votes
2 answers

Unable to write an error message when on a pre-commit hook

I'm writing a pre-commit hook, or better, I'm editing the hook that comes standard on the tigris SVN release. My goals are modest, I just want to write an error message to the person who has commited without providing a commit message. So my…
Jasper
  • 233
  • 1
  • 4
  • 12
3
votes
1 answer

How are the subversion hook templates generated for each repository?

We are using Subversion Edge 5.2 on Windows. Whenever we create a repo, a hooks folder within the repo is pre-populated with the following templates: post-commit.tmpl post-lock.tmpl…
Pedro Vera
  • 41
  • 3
3
votes
1 answer

SVN hooks stopped working suddenly

Our hooks have stopped working suddenly. All was working fine and suddenly stopped - no updates have been done to env. whatsoever. To add to this, hook is working when executed as a apache user in shell but not when committing through apache…
Marcin
  • 5,469
  • 15
  • 55
  • 69
3
votes
1 answer

Is there a hook available when creating a tag in Subversion?

I think the question explains it all, but let me explain what I want to do. I am playing around with the idea of whenever a tag is created in my repo, all the commit messages entered since the previous tag are entered into a wiki page. That way,…
Dan Appleyard
  • 7,405
  • 14
  • 49
  • 80
3
votes
2 answers

svn pre-commit hook - how to block a keyword in certain file types?

I'm trying to write a svn pre-commit hook which will give an error if certain keywords exist in certain file types. The case for me is, if the file is a .java, .jsp or .jspf file I want to make sure that "http://" and "https://" do not exist in…
Ben Carlson
  • 762
  • 8
  • 18
3
votes
3 answers

How can I add multiple SVN Hooks

I've got several (in this case, pre-commit) hooks that I would like to have run during the same event. Right now, they are all just shell-scripts, so I know I could just concatenate them to get them all to run. In the future though, additional…
Alister Bulman
  • 34,482
  • 9
  • 71
  • 110
3
votes
1 answer

VisualSVN pre-commit rule

Using this hook with VisualSVN Server, added to the Repository/hooks folder as pre-commit.bat. My question is how do I add the rule that a comment must always start with a numeric value? I want the first part of the comment to always be the issue…
user23048345
  • 3,033
  • 7
  • 31
  • 31
3
votes
2 answers

SVN hook script conflict

I am trying to write a pre-commit hook script that will alter a specific svn-property of a folder/file. The script looks fairly similar to the one that is documented in the svn book. I figured out how to set/change the property of a node and when…
Mark
  • 7,891
  • 5
  • 27
  • 36
3
votes
2 answers

svn post-commit hook failed (exit code 6) with output:

I am trying to update a remote server's repository using ssh from a shell script via svn post-commit hook. What I did was, Wrote a shell script to ssh to the server and update the repository Added a line to execute the above script on post-commit…
Vivek S
  • 5,384
  • 8
  • 51
  • 72
3
votes
2 answers

SVN post-commit script not being executed

I have spent a couple weeks now trying to resolve this issue (without any progress). I followed the svn redbook section "Implementing Repository Hooks" by: copying the $REPOSITORY_HOME/hooks/post-commit.tmpl file to…
akg1817
  • 31
  • 1
  • 2
3
votes
3 answers

post-commit hook, svn: E020024: Error resolving case of

I'm using VisualSVN Server to manage a source folder. It's installed on a Windows XP machine, and it has access to a network disk. On this network disk named W:, I made a checkout on a folder this way: svn checkout https://server:443/svn/Project…
Elias Platek
  • 1,074
  • 1
  • 9
  • 16
1 2
3
14 15