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
8
votes
2 answers

Subversion Hook

I am working in a project where there are configuration files, one in number for each of the environments where the application would be deployed. When a developer modifies one of these files, the developer should not be allowed to check-in the file…
Shyam Kumar Sundarakumar
  • 5,649
  • 13
  • 42
  • 69
6
votes
2 answers

Automatically synchronizing a Subversion repository and a Git repository

My project has a Subversion repository on a network file system, and a new team would like to access it using Git, and be able to commit to it and get updates from it. What I have in mind is to create a new bare git-svn clone of the Subversion…
Daniel Hershcovich
  • 3,751
  • 2
  • 30
  • 35
6
votes
7 answers

Subversion hook does not accept certificate permanently

I hope someone will be able to answer my question. I have Subversion set up, served by Apache2+SSL, doing web development. I want a post-commit hook that runs svn update on my testing server, so when someone commits, it will automatically update the…
Justin
6
votes
2 answers

Jenkins Partial Build / Modular Build on Commit Hook

Tools: Jenkins ver. 1.470 Maven 2 Subversion Environment Assume my build has a number of projects A-D. The dependency graph exists as shown. That is to say: B depends on classes in A, C depends on classes in B, D depends on classes in A. We…
5
votes
3 answers

SVN post commit hook to email user when a particular file is changed

I would like to add a post commit hook so that if a user commits changes to a particular file, I will be notified by email. Has anyone seen an example of this, or is it possible? I have set up a pre commit hook before, but that's limit of my…
John
  • 698
  • 1
  • 11
  • 22
5
votes
1 answer

Svn PRE-COMMIT Hook scanning java class content

First time I'm doing an hook like this.. I need a pre-commit hook that scan all the java classes to commit, it should check for the presence of some character into the class and avoid the commit if found some of them, chars like † or ¥ and so on, i…
ivoruJavaBoy
  • 1,307
  • 2
  • 19
  • 39
5
votes
1 answer

Is it possible on windows to prevent other applications hooking in system DLLs

I am desperately looking for a cause of crashes in my Qt-based Application. After some observation I've detected, that alone opening a QFileDialog, which is standard windows file dialog, even without selecting any file, causes the application to…
Valentin H
  • 7,240
  • 12
  • 61
  • 111
4
votes
1 answer

How to setup VisualSVN post-commit hooks in win7 64bit

My post-commit hook is never triggered and i think it's because there is some filesystem permissions i need to set. I have VisualSVN-Server-2.5.2 installed and running eclipse with Subversion pluggin. Everything is working as expected except for…
Erik
  • 5,039
  • 10
  • 63
  • 119
4
votes
1 answer

Adding subversion commit hooks for all repositories

I have a subversion installation with one repository per project and would like to add a few commit hooks that should apply for all the repositories. Is there any way to add a hook for all repositories? Especially in such a way that when I add a new…
Youri
  • 73
  • 1
  • 3
4
votes
2 answers

SVN pre-commit hook encoding

I'm using Python script to implement SVN pre-commit hook: svnlookPath = 'path-to-svnlook' f = subprocess.Popen([svnlookPath, 'log', sys.argv[1], '--transaction', sys.argv[2]], stdout=subprocess.PIPE).stdout commitMessage =…
alexey
  • 8,360
  • 14
  • 70
  • 102
4
votes
3 answers

Subversion post-commit hook

I have created a subversion post-commit hook to send out an email everytime a commit is made.Im calling a python script from the file post-commit in /var/svn/repos/hooks . REPOS="$1" REV="$2" ~/svnnotify.py $REV But the problem is that the svn…
JoeRP
  • 61
  • 1
  • 6
4
votes
1 answer

"You need version 1.5.0 or better of the Subversion Python bindings" while using mailer.py

I am trying to setup a post-commit hook in my Subversion server to send email notifications on commits. I am trying to use the mailer.py script that came with my Subversion installation. However, when the script is executed by the hook, I get this…
4
votes
3 answers

How to set and manipulate custom svn revision property using hooks

I want to configure the following: When developers check-in code from their SVN client, a hook should verify whether it has a revision property "CodeReview" set along with the value of the property if it is set. If it is not set then add the…
Yeshwant
  • 71
  • 5
4
votes
3 answers

Creating a Required Comment Hook for Tortoise SVN

Has anyone implemented a hook that requires developers to input x chars before successful submission? I've looked up hooks but don't really understand how to implement this one for Subversion using Tortoise specifically for a Windows Environment.
PositiveGuy
  • 46,620
  • 110
  • 305
  • 471
3
votes
1 answer

post-commit hook failed (exit code 255) error

Committing file gives Warning: post-commit hook failed (exit code 255) with no output. No email is sent out too. My hooks/post-commit file has the following content #!/bin/sh REPOS="$1" REV="$2" "$REPOS"/hooks/mailer.py commit "$REPOS" $REV…
user1076881
  • 241
  • 7
  • 15
1
2
3
14 15