0

The title must sound strange but I'm trying to achieve the following:

SVN repo location: /home/flx/svn/flxdev SVN repo "flxdev" structure:

 + Project1 ++ files + Project2 + Project3 + Project4 

I'm trying to set up a post-commit hook that automatically checks out on the other end when I do a commit.

The post-commit doc explicitly lists the following:

# POST-COMMIT HOOK # # The post-commit hook is invoked after a commit. Subversion runs # this hook by invoking a program (script, executable, binary, etc.) # named 'post-commit' (for which this file is a template) with the # following ordered arguments: # # [1] REPOS-PATH (the path to this repository) # [2] REV (the number of the revision just committed) 

So I made the following command to test:

REPOS="$1" REV="$2" echo "Updated project $REPOS to $REV" 

However when I edit files in Project1 for example, this outputs "Updated project /home/flx/svn/flxdev to 1016"

I'd like this to be: "Updated project Project1 to 1016"

Having this variable allows me to specify to do different actions per project post-commit. How can I specify the project parameter?

Thanks!

Dennis

1 Answer 1

1

Use svnlook.

Quick and dirty would be to try something like:

REPOS="$1" REV="$2" CHANGED_DIRS="`/usr/bin/svnlook -r $REV dirs-changed $REPOS`" echo "Updated paths $CHANGED_DIRS in revision $REV" 

You may want to try running svnlook help; it will list out the various commands you can use/information you can get.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.