How can I get a binding after a commit that is called only when transactions are done in TRUNK?

I have a repository that has the following directories:

  • branches
  • tags
  • trunk

The trunk directory contains the main development line. I created a post-commit hook script for a repository that updates the working copy (trunk) when the user returns to the repository.

It looks something like this:

/usr/bin/svn update /path/to/a/working/copy

I just created a code branch as I am about to start some major changes, but noticed that when I commit my changes to the branches, it calls the binding after commit and updates the working copy (copy of the trunk).

Is there a way to change either my post-commit hook script or the parameter I can do that will only update the working copy if the commit was made to the trunk directory, and not some other directory?

+5
source share
2 answers

As you can see in this documentation , parameters are passed in a post-commit script.

The repository passes two arguments to this program: the path to the repository and the new version number that was created.

The post-commit terminal can be any program of any type: bash script, C program, python script ... What happens is that the shell starts this program with two parameters.

. python script, python svn libs.

, - , , (. Paul answer). revnum , , .

+4

Bishiboosh , . , , C. .

, , subversion. , , , , , Python, . script .

, , . checkin... , , - , . , , .

( Perl) checkin. script, , , .

+2

All Articles