Subversion multi checkout post-commit hook?
Posted
by
FLX
on Super User
See other posts from Super User
or by FLX
Published on 2010-12-22T18:55:45Z
Indexed on
2010/12/22
18:56 UTC
Read the original article
Hit count: 348
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
© Super User or respective owner