///Subversion Hook

Subversion Hook

Subversion hooks allow you to do some interesting stuffs at specific svn events which you can not do otherwise. For example consider the followings

1. Inform all users of that repository right after any commit
2. If some one locks a file, inform the admin after a successful unlock
3. Keeping track of commits made by any user
4. Do anything after the following event occurs

Start Commit
Pre Commit
Post Commit
Pre Lock
Post Lock
Pre Unlock
Post Unlock
Pre Revision Property Change
Post Revision Property Change

So how to do it? open the hooks folder under your repository folder and find there are files identical to these events. So if you want to do something, for example, after any commit then open post-commit.tmpl file and write code inside it. Write code in python, php, perl, bash or whatever and make that file executable using “chmod” and you are done. Subversion server will take care of the rest.

2010-05-25T22:25:22+00:00 February 26th, 2008|General|0 Comments

About the Author:

Leave A Comment