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

TortoiseSVN never runs post-commit.bat

I have set up my subversion/trac environment on Windows (Now Win7, previously tried on Vista) and all works perfectly. But I can't get my post-commit to work. Here's the setup (using VisualSVN and Trac running on…
mistalaba
  • 558
  • 1
  • 7
  • 19
2
votes
5 answers

Subversion Post-Commit Hooks

I am having some issues getting post-commit hooks to work. Subversion doesn't appear to be triggering my post-commit hook when I commit a changed file to my repository. I am using TortoiseSVN and VisualSVN with Subversion, I was able to go into the…
mgrenier
  • 1,409
  • 3
  • 21
  • 45
2
votes
1 answer

svnsync can't start pre-revprop-change hook

I'm trying to use svnsync. It works on one target server, but fails on another with very similar setup and I can't find what's different. The source server is the same in both cases so I guess it's setup is irrelevant. Target server is: Windows…
Ivan
  • 9,089
  • 4
  • 61
  • 74
2
votes
1 answer

How to exclude notifications outside the trunk using post-commit hook with VisualSVNServerHooks.exe?

We currently use an SVN hook (below) that sends email notification on every commit in the repository. I am looking for a way to limit notifications only to changes that occur in the trunk, excluding tags/branches/etc. Is there a way to create a…
Dave Shuck
  • 583
  • 1
  • 6
  • 19
2
votes
1 answer

How to access the tag name in svn pre-commit hook

I have a list of tags that cannot be changed and was wanting to implement a pre-commit hook that will check my list to make sure that none of the files being changed are in any of the immutable tags. It seems I only have access to the revision…
alh
  • 2,569
  • 6
  • 29
  • 42
2
votes
1 answer

use svnlook proplist / propget in svn post hook

I have added a property to my SVN using: svn propset MyProp "MyValue" . and i did commit it: svn ci -m "add some prop stuff..." but now I try to read this property in a post-commit hook: /usr/bin/svnlook proplist $1 -t $2 --verbose . but all I…
2
votes
1 answer

VisualSVN Server post-commit hook script to send an email notification

Can someone help me in posting some VisualSVN post-commit hook scripts to send a mail whenever there is some changes in a file in repository?
2
votes
1 answer

Do svn hooks read vbs, ruby, ... scripts because of .NET?

I'm new to the .NET world, and I would like to make my understanding clear. Is the reason to why SVN hooks are able to read Ruby or Visual Basic scripts and more, because the hooks are compiled under the .NET Framework? Thank you
Conrad C
  • 746
  • 1
  • 11
  • 32
2
votes
1 answer

git not receiving post commit results from svn server

I'm using git to commit to an svn server, which has a post commit hook. This post commit hook is supposed to return some text to the client. The hook works fine when I use pure svn, but git svn does not display the text. Googling around, I have been…
Spencer Rathbun
  • 14,510
  • 6
  • 54
  • 73
2
votes
2 answers

Where can I find the file VisualSVNServerHooks.exe

I'm trying to activate the post-commit hook in SVN, and I don't have the file VisualSVNServerHooks.exe where can I find it? Thanks, Oded.
Oded
  • 795
  • 2
  • 12
  • 32
2
votes
1 answer

Using python scripts in subversion hooks on windows

My main goal is to get this up and running. My hook gets called when I do the commit with Tortoise SVN, but it always exits when I get to this line: Python "%~dp0trac-post-commit-hook.py" -p "%TRAC_ENV%" -r "%REV%" || EXIT 5 If I try and replace the…
going
  • 9,669
  • 4
  • 36
  • 37
2
votes
1 answer

Ant/Subversion hook: How does ${user.dir} get set?

My company is transitioning from Visual Source Safe to Subversion; our pipeline management tools rely on the existence of the 'shadow folder' that VSS provides in order to move code from version control out to the various test environments. Note: we…
rguilbault
  • 553
  • 1
  • 5
  • 17
2
votes
1 answer

What are local hooks for in TortoiseSVN?

I just realized that TSVN supports local hooks. Can someone explain what they can be useful for? I already use server-side hooks to enforce entering log message for commits and prevent certain files from being checked in; also use post-commit hooks…
Joe Schmoe
  • 1,574
  • 4
  • 23
  • 48
1
vote
2 answers

Does Visual Source Support SVN-like Post Commit Hooks?

I am forced to use Visual Source Safe at my current job. Yes I know, It's like a stick in the eye. But VSS won't go away, VSS is here to stay. I was wondering if there is any way to do something similar to Subversion's Post-Commit hooks in VSS?…
Byron Whitlock
  • 52,691
  • 28
  • 123
  • 168
1
vote
0 answers

Is there a way to block SVN commits unless they have a certain description in the commit description window using a hook?

I want to stop developers from committing unless they reference a ticket in the message field of their SVN commit. for example, it should read something like "see ticket #999 - (description of change)" and if they don't have that formatting, it…