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
0
votes
1 answer

post commit hook fail

I have Master/Slave setup using Win2k8R with SVN 1.6.9 and using TortoiseSVN 1.6.7. The access is through Apache and using http. Everything works but when I commit I get the following message: Error: post-commit hook failed (exit code 1) with…
0
votes
2 answers

Subversion post-commit hook

I am trying to get SVN to copy files to my htdocs folder on commit. Here is what I have so far in my post-commit.bat: "C:\subversion\bin\svn.exe" update "C:\apache\apache2.2\htdocs" When I look at the log files created by the hook I get the…
GeoSQL
  • 5
  • 1
  • 4
0
votes
0 answers

Calling SVN post-lock only once

I've been trying to write a post-lock hook for my VisualSVN server on Windows, using batch files and VBS scripts. The end goal is to have the hook email a list of all the locked files to a collection of email addresses. However, the hook is called…
JamesT
  • 47
  • 2
  • 9
0
votes
1 answer

Subversion Copy Hook on Windows

I am working on a web based project in my free time. I have SVN set up on my machine (running XP). What I would like to do is have a copy of my repository copied to the htdocs folder (Dev machine) post-commit via a hook. That way I can test my…
GeoSQL
  • 5
  • 1
  • 4
0
votes
1 answer

svn post-commit script runs from command line, but not when commiting file(s) to svn

I have a post-commit hook in svn that runs fine from the command line when I run env - ./foo.sh /path/to/svn/repos/ 12345 but when the script is called from svn it does not appear to work. What I am basically doing is checking the committed files…
funkadelic
  • 183
  • 3
  • 14
0
votes
2 answers

Subversion Edge svnsync: DAV request failed & pre-revprop-change error

I've set up a Subversion Edge server on Windows as part of a migration exercise. Currently I'm struggling with svnsync. When trying to execute the command (on the main server): svnsync initialize https://main.subversion.server/svn/main.svn…
Epidemias
  • 15
  • 1
  • 4
0
votes
1 answer

Why doesn't SVN hook (post commit) execute?

I am trying to execute post-commit hook and no matter what I do I always get: Command: Commit Modified: C:\****\somefile.txt Sending content: C:\****\somefile.txt Completed: At revision: XX Error: post-commit hook failed (exit code 255) with no…
M.V.
  • 1,662
  • 8
  • 32
  • 55
0
votes
1 answer

Enforcing tag naming convention in svn

I am trying to write a pre commit hook script to enforce a tag naming convention like this ___ using a shell script. Can anyone guide me to a doc/link reference which I can follow and can create one. I have…
Aman
  • 357
  • 2
  • 5
  • 17
0
votes
1 answer

Differentiate between a move, rename and a normal add/delete operation in post-commit hook

I need to configure a post-commit hook that will identify a rename operation as Rename in the email. The concern is that we are able to identify them as a Delete & Add operation, but we need to put it up as a single Rename operation. Same is true…
0
votes
1 answer

SVN hooks to link external application

Is there a possibility/way to give a hyperlink (or a reference to a particular link) inside the svn log message so that whenever i click that particular link I'm directed to an external application (such as Internet address to my custom bug tracking…
this-Me
  • 2,139
  • 6
  • 43
  • 70
0
votes
2 answers

How to add the commit comment to a Subversion post-commit hook

I have a working Subversion Post Commit working OK - how do I add in the comments made by the user performing the commit? My code is REPOS="$1" REV="$2" AUTHOR="$(svnlook author -r $REV $REPOS)" mailer.py commit "$REPOS" "$REV"…
benb3342
  • 13
  • 4
0
votes
0 answers

Python syntax error in unix but works fine in windows python

I am trying to create a subversion hook for running PMD rules based on this article: http://yarenty.blogspot.in/2014/02/svn-hooks-to-automatically-check-code.html I was able to get it working in Windows but having trouble getting it to work in…
0
votes
3 answers

Subversion hook for setting properties

Please, help me with hook script on server which set svn:mime-type to application/octet-stream on all new and existing files automatically on each commit from working copy to repository. (I need it to prevent subversion auto merge files on…
drizzt
  • 2,756
  • 6
  • 27
  • 41
0
votes
2 answers

Svn post-commit hook failing on command not found

I'm trying to call a script using a post-commit hook, but it fails because it cannot find various commands. My research has shown that there are basically no environment variables loaded when a post-commit hook is run, so I suppose that's why it…
nullByteMe
  • 6,141
  • 13
  • 62
  • 99
0
votes
2 answers

SVN update in post-commit hook

I'm trying to write a post-commit hook for a VisualSVN server on MSWindows, that immediately after the commit updates the server's project. On the server side: when I'm commiting a revision the svn up command cannot be executed in the hook. On the…
Mihai238
  • 1,087
  • 13
  • 26