[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Post-commit on branch

From: Vincent Vanderheeren <vincent.Vanderheeren_at_one-agency.be>
Date: 2007-04-27 09:08:18 CEST

Hi,

 

I have a parent repository with many subrepositories. I am used to work with
the post-commit hook so that on every commit a database backup is made, and
an export occurs to the development version of a certain project. This all
works fine, but now I have a branch of a certain project. Consider the
following:

My project's repository location is: /opt/svn/mycompany/myproject. The
project itself defines a branch (representing a particular customer for that
project): /var/www/myproject/branches/mycustomer. Currently I only work on
that branch, but I do not merge so often. It would be nice that if I commit
on the branch the post-commit hook would be triggered from
/opt/svn/mycompany/myproject/hooks/post-commit. But it doesn't.

 

1. Is this possible or do I first have to merge with the central
project, commit from there which will trigger the post-commit?
2. If the central post-commit hook is triggered, is there a way to know
which branch is being committed to, so that not every branch will be
exported on a commit of just one branch, in other words I just want the
branch to be exported, and not every branch inside the central project.

 

My post-commit hook looks as follows:

 

/usr/bin/svn --force export
http://10.01.01.200/svn/mycompany/myproject/branches/mycustomer
/var/www/myproject-mycustomer > /tmp/test.log 2>&1

mysqldump --password=thisisfake -q -u alsofake mycystomerdatabasename >
/var/www/myproject-mycustomer/database/dbdump_$2.sql

 

The post-commit hook works if I trigger it manually (./post-commit).

I really hope you will take the time to answer this question, because I
think you must get thousands of questions a day. But I would appreciate it.

 

Btw great job on a superb project. I really enjoy working with subversion.
Currently I work with subclipse which really makes life easier.

 

With kind regards,

 

Vincent Vanderheeren

 

ONE Agency NV

Technologiepark 3

9052 GENT (Zwijnaarde)

T +32 9 2436 011

F +32 9 2436 006

www.one-agency.be

 
Received on Fri Apr 27 21:38:59 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.